public interface RoleTypeContributor
Modifier and Type | Method and Description |
---|---|
default java.lang.String |
getClassName()
Optionally returns a class name to be used when creating a new role of
this type.
|
default java.lang.String[] |
getExcludedRoleNames()
Returns a list of role names whose permissions cannot be manually defined
by users.
|
java.lang.String |
getIcon()
Returns the CSS class of the role type icon.
|
java.lang.String |
getName()
Returns the role type name.
|
default java.lang.String[] |
getSubtypes()
Optionally returns an array of subtypes for this role type.
|
java.lang.String |
getTabTitle(java.util.Locale locale)
Returns the title to display for this role type's tab.
|
java.lang.String |
getTitle(java.util.Locale locale)
Returns the title to display for this role type in the creation menu.
|
int |
getType()
Returns an integer that represents the role type.
|
default java.lang.String |
getTypeLabel() |
boolean |
isAllowAssignMembers(com.liferay.portal.kernel.model.Role role)
Returns
true if users are allowed to assign members to the
role; false otherwise. |
default boolean |
isAllowDefinePermissions(com.liferay.portal.kernel.model.Role role)
Returns
true if users are allowed to define permissions
granted by the role; false otherwise. |
boolean |
isAllowDelete(com.liferay.portal.kernel.model.Role role)
Returns
true if users are allowed to delete the role;
false otherwise. |
default boolean |
isAutomaticallyAssigned(com.liferay.portal.kernel.model.Role role)
Returns
true if the role is automatically assgned;
false otherwise. |
default com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.Role> |
searchRoles(long companyId,
java.lang.String keywords,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator) |
default java.lang.String getClassName()
null
is returned, use the class name of the role.default java.lang.String[] getExcludedRoleNames()
java.lang.String getIcon()
java.lang.String getName()
Example: "regular"
default java.lang.String[] getSubtypes()
java.lang.String getTabTitle(java.util.Locale locale)
Example: "Regular Roles"
locale
- the locale to applyjava.lang.String getTitle(java.util.Locale locale)
Example: "Regular Roles"
locale
- the locale to applyint getType()
com.liferay.roles.admin.internal.role.type.contributor.RoleTypeContributor
.default java.lang.String getTypeLabel()
boolean isAllowAssignMembers(com.liferay.portal.kernel.model.Role role)
true
if users are allowed to assign members to the
role; false
otherwise.role
- a roletrue
if users are allowed to assign members to the
role; false
otherwisedefault boolean isAllowDefinePermissions(com.liferay.portal.kernel.model.Role role)
true
if users are allowed to define permissions
granted by the role; false
otherwise.role
- a roletrue
if users are allowed to define permissions
granted by the role; false
otherwiseboolean isAllowDelete(com.liferay.portal.kernel.model.Role role)
true
if users are allowed to delete the role;
false
otherwise.role
- a roletrue
if users are allowed to delete the role;
false
otherwisedefault boolean isAutomaticallyAssigned(com.liferay.portal.kernel.model.Role role)
true
if the role is automatically assgned;
false
otherwise.role
- a roletrue
if the role is automatically assgned;
false
otherwisedefault com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.Role> searchRoles(long companyId, java.lang.String keywords, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)