mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged WEBAPP-API (5.2.1) to 5.2.N (5.2.1)
136749 jkaabimofrad: Minor re-formatting (replace tabs with spaces) noted via APPSREPO-147. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@136756 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -39,13 +39,13 @@ public interface Favourites
|
||||
{
|
||||
String PARAM_INCLUDE_PATH = Nodes.PARAM_INCLUDE_PATH;
|
||||
|
||||
/**
|
||||
* Add a favourite for user personId
|
||||
*
|
||||
* @param personId the personId for which the favourite is to be added
|
||||
* @param favourite the favourite to add
|
||||
*/
|
||||
Favourite addFavourite(String personId, Favourite favourite);
|
||||
/**
|
||||
* Add a favourite for user personId
|
||||
*
|
||||
* @param personId the personId for which the favourite is to be added
|
||||
* @param favourite the favourite to add
|
||||
*/
|
||||
Favourite addFavourite(String personId, Favourite favourite);
|
||||
|
||||
/**
|
||||
* Add a favourite for user personId taking parameters into account
|
||||
@@ -56,30 +56,30 @@ public interface Favourites
|
||||
*/
|
||||
Favourite addFavourite(String personId, Favourite favourite, Parameters parameters);
|
||||
|
||||
/**
|
||||
* Add a favourite for user personId
|
||||
*
|
||||
* @param personId the personId for which the favourite is to be removed
|
||||
* @param id the id of the favourite to remove (id is a uuid)
|
||||
*/
|
||||
/**
|
||||
* Add a favourite for user personId
|
||||
*
|
||||
* @param personId the personId for which the favourite is to be removed
|
||||
* @param id the id of the favourite to remove (id is a uuid)
|
||||
*/
|
||||
void removeFavourite(String personId, String id);
|
||||
|
||||
/**
|
||||
* Get a paged list of favourites for user personId
|
||||
*
|
||||
* @param personId the personId for which the favourite is to be removed
|
||||
* @param parameters Parameters
|
||||
* @return paged favourites
|
||||
*/
|
||||
/**
|
||||
* Get a paged list of favourites for user personId
|
||||
*
|
||||
* @param personId the personId for which the favourite is to be removed
|
||||
* @param parameters Parameters
|
||||
* @return paged favourites
|
||||
*/
|
||||
CollectionWithPagingInfo<Favourite> getFavourites(String personId, final Parameters parameters);
|
||||
|
||||
/**
|
||||
* Get a specific favourite for user personId
|
||||
*
|
||||
* @param personId the personId for which the favourite is to be removed
|
||||
* @param favouriteId the favourite id
|
||||
* @return the favourite
|
||||
*/
|
||||
/**
|
||||
* Get a specific favourite for user personId
|
||||
*
|
||||
* @param personId the personId for which the favourite is to be removed
|
||||
* @param favouriteId the favourite id
|
||||
* @return the favourite
|
||||
*/
|
||||
Favourite getFavourite(String personId, String favouriteId);
|
||||
|
||||
/**
|
||||
|
@@ -49,12 +49,12 @@ RelationshipResourceAction.Create<Favourite>, RelationshipResourceAction.Delete
|
||||
|
||||
private Favourites favourites;
|
||||
|
||||
public void setFavourites(Favourites favourites)
|
||||
{
|
||||
this.favourites = favourites;
|
||||
}
|
||||
public void setFavourites(Favourites favourites)
|
||||
{
|
||||
this.favourites = favourites;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void afterPropertiesSet()
|
||||
{
|
||||
ParameterCheck.mandatory("favourites", this.favourites);
|
||||
@@ -72,34 +72,34 @@ RelationshipResourceAction.Create<Favourite>, RelationshipResourceAction.Delete
|
||||
return favourites.getFavourites(personId, parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Adds the given site as a favourite site for the user.
|
||||
*
|
||||
* @see org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction.Create#create(String, java.util.List, org.alfresco.rest.framework.resource.parameters.Parameters)
|
||||
*/
|
||||
@Override
|
||||
*/
|
||||
@Override
|
||||
@WebApiDescription(title = "Add Person Favorite", description = "Favorite something")
|
||||
public List<Favourite> create(String personId, List<Favourite> entity, Parameters parameters)
|
||||
{
|
||||
List<Favourite> ret = new ArrayList<Favourite>(entity.size());
|
||||
public List<Favourite> create(String personId, List<Favourite> entity, Parameters parameters)
|
||||
{
|
||||
List<Favourite> ret = new ArrayList<Favourite>(entity.size());
|
||||
for(Favourite favourite : entity)
|
||||
{
|
||||
ret.add(favourites.addFavourite(personId, favourite, parameters));
|
||||
ret.add(favourites.addFavourite(personId, favourite, parameters));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@WebApiDescription(title = "Remove Person Favorite", description = "Un-favorite something")
|
||||
public void delete(String personId, String id, Parameters parameters)
|
||||
{
|
||||
favourites.removeFavourite(personId, id);
|
||||
}
|
||||
public void delete(String personId, String id, Parameters parameters)
|
||||
{
|
||||
favourites.removeFavourite(personId, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Favourite readById(String personId, String favouriteId, Parameters parameters)
|
||||
throws RelationshipResourceNotFoundException
|
||||
{
|
||||
return favourites.getFavourite(personId, favouriteId, parameters);
|
||||
}
|
||||
@Override
|
||||
public Favourite readById(String personId, String favouriteId, Parameters parameters)
|
||||
throws RelationshipResourceNotFoundException
|
||||
{
|
||||
return favourites.getFavourite(personId, favouriteId, parameters);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user