Class Profile


  • public class Profile
    extends ProfileDescription
    A user profile defined in an application component. A user profile is a mix between a role and some privileges. The name of the profile denotes the name of the role. If the application can describe any role it supports, even new ones, Silverpeas does support only a set of predefined roles, all of them represented in the SilverpeasRole enum. To these roles are automatically mapped some privileges which are all hard-coded and based upon access rights conventions in Silverpeas (for example the SilverpeasRole.READER role has read-only access to the contributions). So, when a user profile is defined for an application, a mapping between this profile with one of the predefined user profile in Silverpeas is required; if no mapping is provided, then by default the name of the profile should match the name of a predefined profile. The mapping of profiles are applied between those of the parent space and the instances of the application component; so only a subset of predefined roles in Silverpeas is concerned by the mapping of profiles: see InheritableSpaceRoles to have a look of them.
    • Field Detail

    • Constructor Detail

      • Profile

        public Profile()
    • Method Detail

      • getName

        public String getName()
        Gets the value of the name property.
        Returns:
        possible object is String
      • setName

        public void setName​(String value)
        Sets the value of the name property.
        Parameters:
        value - allowed object is String
      • getSpaceProfileMapping

        @Nonnull
        public ComponentSpaceProfileMapping getSpaceProfileMapping()
        Gets the mapping between this user profile with those of the parent space of the component. By convention, if no mapping is explicitly defined, then the default mapping applied is on the profile name, even this name doesn't match any predefined space profile; in this case, the mapping should be ignored and no role inheritance should be applied for this profile.
        Overrides:
        getSpaceProfileMapping in class ProfileDescription
        Returns:
        the mapping of this profile with at least one of the parent space. By default, if no mapping has been defined in the descriptor of the application, the mapping is on the user profile in the parent space having the same name that this profile.