Interface RoleTypeContributor
public interface RoleTypeContributor
Represents a role type entry to contribute in the Roles Admin portlet. A tab
is created for each role type.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringOptionally returns a class name to be used when creating a new role of this type.default String[]Returns a list of role names whose permissions cannot be manually defined by users.getIcon()Returns the CSS class of the role type icon.getName()Returns the role type name.default String[]Optionally returns an array of subtypes for this role type.getTabTitle(Locale locale) Returns the title to display for this role type's tab.Returns the title to display for this role type in the creation menu.intgetType()Returns an integer that represents the role type.default StringbooleanisAllowAssignMembers(com.liferay.portal.kernel.model.Role role) Returnstrueif users are allowed to assign members to the role;falseotherwise.default booleanisAllowDefinePermissions(com.liferay.portal.kernel.model.Role role) Returnstrueif users are allowed to define permissions granted by the role;falseotherwise.booleanisAllowDelete(com.liferay.portal.kernel.model.Role role) Returnstrueif users are allowed to delete the role;falseotherwise.default booleanisAutomaticallyAssigned(com.liferay.portal.kernel.model.Role role) Returnstrueif the role is automatically assgned;falseotherwise.default com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.Role>searchRoles(long companyId, String keywords, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
-
Method Details
-
getClassName
Optionally returns a class name to be used when creating a new role of this type. Ifnullis returned, use the class name of the role.- Returns:
- a class name to be used when creating a new role of this types
-
getExcludedRoleNames
Returns a list of role names whose permissions cannot be manually defined by users.- Returns:
- a list of role names whose permissions cannot be manually defined by users
-
getIcon
String getIcon()Returns the CSS class of the role type icon.- Returns:
- the CSS class of the role type icon
-
getName
String getName()Returns the role type name.Example:
"regular"- Returns:
- the role type name
-
getSubtypes
Optionally returns an array of subtypes for this role type.- Returns:
- an array of subtypes for this role type
-
getTabTitle
Returns the title to display for this role type's tab.Example:
"Regular Roles"- Parameters:
locale- the locale to apply- Returns:
- the title to display for this role type's tab
-
getTitle
Returns the title to display for this role type in the creation menu.Example:
"Regular Roles"- Parameters:
locale- the locale to apply- Returns:
- the title to display for this role type in the creation menu
-
getType
int getType()Returns an integer that represents the role type. It is used as a key to retrieve thecom.liferay.roles.admin.internal.role.type.contributor.RoleTypeContributor.- Returns:
- an integer that represents the role type
-
getTypeLabel
-
isAllowAssignMembers
boolean isAllowAssignMembers(com.liferay.portal.kernel.model.Role role) Returnstrueif users are allowed to assign members to the role;falseotherwise.- Parameters:
role- a role- Returns:
trueif users are allowed to assign members to the role;falseotherwise
-
isAllowDefinePermissions
default boolean isAllowDefinePermissions(com.liferay.portal.kernel.model.Role role) Returnstrueif users are allowed to define permissions granted by the role;falseotherwise.- Parameters:
role- a role- Returns:
trueif users are allowed to define permissions granted by the role;falseotherwise
-
isAllowDelete
boolean isAllowDelete(com.liferay.portal.kernel.model.Role role) Returnstrueif users are allowed to delete the role;falseotherwise.- Parameters:
role- a role- Returns:
trueif users are allowed to delete the role;falseotherwise
-
isAutomaticallyAssigned
default boolean isAutomaticallyAssigned(com.liferay.portal.kernel.model.Role role) Returnstrueif the role is automatically assgned;falseotherwise.- Parameters:
role- a role- Returns:
trueif the role is automatically assgned;falseotherwise
-
searchRoles
default com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.Role> searchRoles(long companyId, String keywords, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
-