Package io.meeds.social.category.plugin
Interface CategoryPlugin
public interface CategoryPlugin
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether an associated object to a category is accessible to a user.booleanChecks whether an associated object to a category is editable to a user.getCategoryIds(long spaceId) param spaceId Space IdentifiergetCategoryIds(long spaceId, String username) param spaceId Space Identifierdefault CategoryEntryItemgetEntryItem(String objectId, String username) Resolves a generic, object-type agnostic preview (title, summary, image, author, date, url ...) of the designated object, so that it can be displayed in a Category entries listing (browse entries by Category) without the caller having to know anything specific to this objectType.default CategoryObjectgetObject(CategoryObject metadataObject) getType()
-
Method Details
-
getType
String getType()- Returns:
- The managed Object Type (Space, Activity...)
-
canAccess
Checks whether an associated object to a category is accessible to a user. This check will be called after checking whether the user can access or not to the category (generic ACL check made in Category API based on Category properties)- Parameters:
objectId- Object technical identifierusername- User technical name (login identifier)- Returns:
- true if the user has access permission to the designated Object Type
-
canEdit
Checks whether an associated object to a category is editable to a user. This check will be used mainly used to know if a user can modify the object in order to associate/link a category into it. This check will be called after checking whether the user can link or not an object to the category (generic ACL check made in Category API based on Category properties)- Parameters:
objectId- Object technical identifierusername- User technical name (login identifier)- Returns:
- true if the user has access permission to the designated Object Type identified by its Id
-
getCategoryIds
-
getCategoryIds
param spaceId Space Identifier -
getCategoryIds
param spaceId Space Identifier -
getObject
-
getEntryItem
Resolves a generic, object-type agnostic preview (title, summary, image, author, date, url ...) of the designated object, so that it can be displayed in a Category entries listing (browse entries by Category) without the caller having to know anything specific to this objectType.- Parameters:
objectId- Object technical identifierusername- User technical name (login identifier)- Returns:
CategoryEntryItemor null when this objectType isn't meant to be browsable as an entry (Space, Activity ...)
-