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 Type
    Method
    Description
    default String
    Optionally 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.
    Returns the CSS class of the role type icon.
    Returns the role type name.
    default String[]
    Optionally returns an array of subtypes for this role type.
    Returns the title to display for this role type's tab.
    getTitle(Locale locale)
    Returns the title to display for this role type in the creation menu.
    int
    Returns an integer that represents the role type.
    default String
     
    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, String keywords, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Role> orderByComparator)
     
  • Method Details

    • getClassName

      default String getClassName()
      Optionally returns a class name to be used when creating a new role of this type. If null is returned, use the class name of the role.
      Returns:
      a class name to be used when creating a new role of this types
    • getExcludedRoleNames

      default String[] 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

      default String[] getSubtypes()
      Optionally returns an array of subtypes for this role type.
      Returns:
      an array of subtypes for this role type
    • getTabTitle

      String getTabTitle(Locale locale)
      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

      String getTitle(Locale locale)
      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 the com.liferay.roles.admin.internal.role.type.contributor.RoleTypeContributor.
      Returns:
      an integer that represents the role type
    • getTypeLabel

      default String getTypeLabel()
    • isAllowAssignMembers

      boolean isAllowAssignMembers(com.liferay.portal.kernel.model.Role role)
      Returns true if users are allowed to assign members to the role; false otherwise.
      Parameters:
      role - a role
      Returns:
      true if users are allowed to assign members to the role; false otherwise
    • isAllowDefinePermissions

      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.
      Parameters:
      role - a role
      Returns:
      true if users are allowed to define permissions granted by the role; false otherwise
    • isAllowDelete

      boolean isAllowDelete(com.liferay.portal.kernel.model.Role role)
      Returns true if users are allowed to delete the role; false otherwise.
      Parameters:
      role - a role
      Returns:
      true if users are allowed to delete the role; false otherwise
    • isAutomaticallyAssigned

      default boolean isAutomaticallyAssigned(com.liferay.portal.kernel.model.Role role)
      Returns true if the role is automatically assgned; false otherwise.
      Parameters:
      role - a role
      Returns:
      true if the role is automatically assgned; false otherwise
    • 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)