com.sap.sl.sdk.authoring.cms
Interface CmsSecurityService


public interface CmsSecurityService

Manages the Semantic Layer security.

This service needs a session that should be provided using CmsSessionService.

A repository path begins with the root part, CmsResourceService.UNIVERSES_ROOT or CmsResourceService.CONNECTIONS_ROOT, followed by a subfolder and the resource name. The separator is /. For example /Connections/myCmsFolder/MyConnection.


Method Summary
 void assignSecurityProfile(java.lang.String universePath, java.lang.String securityProfileName, SecurityProfileType securityProfileType, java.lang.String principalName)
          Deprecated. 
 void attachSecurityProfile(java.lang.String universePath, SecurityProfile securityProfile)
          Deprecated. 
 void detachSecurityProfile(SecurityProfile securityProfile)
          Deprecated. 
 BusinessSecurityProfile getBusinessSecurityProfile(java.lang.String universePath, java.lang.String bspName)
          Deprecated. 
 java.util.List<BusinessSecurityProfile> getBusinessSecurityProfiles(java.lang.String universePath)
          Deprecated. 
 DataSecurityProfile getDataSecurityProfile(java.lang.String universePath, java.lang.String dspName)
          Deprecated. 
 java.util.List<DataSecurityProfile> getDataSecurityProfiles(java.lang.String universePath)
          Deprecated. 
 java.util.List<java.lang.String> getPrincipals(java.lang.String universePath, java.lang.String securityProfileName, SecurityProfileType securityProfileType)
          Deprecated. 
 UniverseSecurityCache getUniverseSecurityCache(java.lang.String universeIdentifier)
           
 void unassignSecurityProfile(java.lang.String universePath, java.lang.String securityProfileName, SecurityProfileType securityProfileType, java.lang.String principalName)
          Deprecated. 
 void updateSecurityProfile(SecurityProfile securityProfile)
          Deprecated. 
 

Method Detail

getUniverseSecurityCache

UniverseSecurityCache getUniverseSecurityCache(java.lang.String universeIdentifier)
                                               throws SlException

Get a universe security cache for the provided universe path or CUID.

A universe security cache contains the list of data security profiles and business security profiles attached to the universe, as well as their assignments to principals (users and groups).

These lists of security profiles and principals assignments can be modified locally, then committed all at once to the CMS using the UniverseSecurityCache.commit() method.

If a universe security cache is no longer in use, it should be closed by calling the method UniverseSecurityCache.close().


The universe security cache use is not compatible with the below CmsSecurityService methods:

  • getDataSecurityProfile(java.lang.String, java.lang.String)
  • getBusinessSecurityProfile(java.lang.String, java.lang.String)
  • getPrincipals(java.lang.String, java.lang.String, com.sap.sl.sdk.authoring.security.SecurityProfileType)
  • attachSecurityProfile(java.lang.String, com.sap.sl.sdk.authoring.security.SecurityProfile)
  • detachSecurityProfile(com.sap.sl.sdk.authoring.security.SecurityProfile)
  • updateSecurityProfile(com.sap.sl.sdk.authoring.security.SecurityProfile)
  • assignSecurityProfile(java.lang.String, java.lang.String, com.sap.sl.sdk.authoring.security.SecurityProfileType, java.lang.String)
  • unassignSecurityProfile(java.lang.String, java.lang.String, com.sap.sl.sdk.authoring.security.SecurityProfileType, java.lang.String)
  • Any change made with these methods will not be reflected in the universe security cache, and may be overwritten when committing the latter.


    Parameters:
    universeIdentifier - Identifier of the universe stored in the CMS repository. It can be one of the following:
  • A String that represents the path of the universe in the CMS repository, from the Universes root folder. See CmsResourceService.UNIVERSES_ROOT.

    Example: /Universes/myCmsFolder/MyUniverse.unx

  • A String that represents the unique identifier of the universe in the CMS repository.

    Example: AUkhFsg72ntHpql8Izl9pv0

  • Returns:
    A UniverseSecurityCache object that contains the universe security profiles definition and assignments.
    Throws:
    SlException - if the universe security cache cannot be retrieved from the CMS, or if the user doesn’t have the right to ‘Administer security profiles’
    Since:
    14.4.0
    See Also:
    UniverseSecurityCache}, DataSecurityProfile}, BusinessSecurityProfile}, com.sap.sl.sdk.authoring.security.Principal Principal}

    getDataSecurityProfile

    @Deprecated
    DataSecurityProfile getDataSecurityProfile(java.lang.String universePath,
                                                          java.lang.String dspName)
                                               throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and UniverseSecurityCache.getDataSecurityProfiles().

    Returns a Data Security Profile attached to a universe. This profile is a descriptor and can be attached to other universes.

    Parameters:
    universePath - The path of the universe, formatted as /Universes/[subFolder]/universe.unx. The root folder is Universes.
    dspName - The name of the Data Security Profile of the universe
    Returns:
    A data security profile
    Throws:
    SlException
    Since:
    14.1.6
    See Also:
    SecurityProfile, DataSecurityProfile

    getDataSecurityProfiles

    @Deprecated
    java.util.List<DataSecurityProfile> getDataSecurityProfiles(java.lang.String universePath)
                                                                throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and UniverseSecurityCache.getDataSecurityProfiles().

    Returns the Data Security Profiles attached to a universe. These profiles are descriptors and can be attached to other universes.

    Parameters:
    universePath - The path of the universe, formatted as /Universes/[subFolder]/universe.unx. The root folder is Universes.
    Returns:
    A list of data security profiles
    Throws:
    SlException
    Since:
    14.0.5
    See Also:
    SecurityProfile, DataSecurityProfile

    getBusinessSecurityProfile

    @Deprecated
    BusinessSecurityProfile getBusinessSecurityProfile(java.lang.String universePath,
                                                                  java.lang.String bspName)
                                                       throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and UniverseSecurityCache.getBusinessSecurityProfiles().

    Returns a Business Security Profile attached to a universe. This profile is a descriptor and can be attached to other universes.

    Parameters:
    universePath - The path of the universe, formatted as /Universes/[subFolder]/universe.unx. The root folder is Universes.
    bspName - The name of the Business Security Profile of the universe
    Returns:
    A business security profile
    Throws:
    SlException
    Since:
    14.1.6
    See Also:
    SecurityProfile, BusinessSecurityProfile

    getBusinessSecurityProfiles

    @Deprecated
    java.util.List<BusinessSecurityProfile> getBusinessSecurityProfiles(java.lang.String universePath)
                                                                        throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and UniverseSecurityCache.getBusinessSecurityProfiles().

    Returns the Business Security Profiles attached to a universe. These profiles are descriptors and can be attached to other universes.

    Parameters:
    universePath - The path of the universe, formatted as /Universes/[subFolder]/universe.unx. The root folder is Universes.
    Returns:
    A list of business security profiles
    Throws:
    SlException
    Since:
    14.1.2
    See Also:
    SecurityProfile, BusinessSecurityProfile

    getPrincipals

    @Deprecated
    java.util.List<java.lang.String> getPrincipals(java.lang.String universePath,
                                                              java.lang.String securityProfileName,
                                                              SecurityProfileType securityProfileType)
                                                   throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and UniverseSecurityCache.getPrincipals(SecurityProfile).

    Returns the principals to whom the Security Profile is assigned. A principal is a user or a group.

    Parameters:
    universePath - The path of the universe, formatted as /Universes/subFolder/universe.unx. The root folder is Universes.
    securityProfileName - The name of the Security Profile of the universe, assigned to the principals
    securityProfileType - The type of security profile (DSP or BSP)
    Returns:
    A list of the principal names
    Throws:
    SlException
    Since:
    14.0.5
    See Also:
    SecurityProfile, DataSecurityProfile

    attachSecurityProfile

    @Deprecated
    void attachSecurityProfile(java.lang.String universePath,
                                          SecurityProfile securityProfile)
                               throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and update the lists of data and business security profiles.

    Attaches a Data Security Profile or Business Security Profile to a universe.

    Parameters:
    universePath - The path of the universe, formatted as /Universes/subFolder/universe.unx. The root folder is Universes.
    securityProfile - The security profile
    Throws:
    SlException
    Since:
    14.0.5
    See Also:
    SecurityProfile, detachSecurityProfile(SecurityProfile)

    detachSecurityProfile

    @Deprecated
    void detachSecurityProfile(SecurityProfile securityProfile)
                               throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and update the lists of data and business security profiles.

    Detaches a Data Security Profile or Business Security Profile from its related universe. The security profile is deleted from the repository.

    Parameters:
    securityProfile - The security profile to detach
    Throws:
    SlException
    Since:
    14.1.6
    See Also:
    SecurityProfile, attachSecurityProfile(String, SecurityProfile)

    updateSecurityProfile

    @Deprecated
    void updateSecurityProfile(SecurityProfile securityProfile)
                               throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and fill the data and business security profiles.

    Updates a Data Security Profile or Business Security Profile of a universe. The security profile must already exist (obtained with getDataSecurityProfiles(java.lang.String) or getBusinessSecurityProfiles(java.lang.String) methods)

    Parameters:
    securityProfile - The security profile
    Throws:
    SlException
    Since:
    14.1.2
    See Also:
    SecurityProfile

    assignSecurityProfile

    @Deprecated
    void assignSecurityProfile(java.lang.String universePath,
                                          java.lang.String securityProfileName,
                                          SecurityProfileType securityProfileType,
                                          java.lang.String principalName)
                               throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and UniverseSecurityCache.getPrincipals(SecurityProfile) then update the list of principals.

    Assigns a Security Profile to a user or a group.

    Parameters:
    universePath - The path of the universe, formatted as /Universes/subFolder/universe.unx. The root folder is Universes.
    securityProfileName - The name of the Security Profile
    securityProfileType - The type of security profile
    principalName - The name of the user or group
    Throws:
    SlException
    Since:
    14.0.5
    See Also:
    SecurityProfile, unassignSecurityProfile(String, String, SecurityProfileType, String)

    unassignSecurityProfile

    @Deprecated
    void unassignSecurityProfile(java.lang.String universePath,
                                            java.lang.String securityProfileName,
                                            SecurityProfileType securityProfileType,
                                            java.lang.String principalName)
                                 throws SlException
    Deprecated. 

    Use getUniverseSecurityCache(String) and UniverseSecurityCache.getPrincipals(SecurityProfile) then update the list of principals.

    Unassigns a Security Profile from a user or a group.

    Parameters:
    universePath - The path of the universe, formatted as /Universes/subFolder/universe.unx. The root folder is Universes.
    securityProfileName - The name of the Data Security Profile
    securityProfileType - The type of security profile
    principalName - The name of the user or group
    Throws:
    SlException
    Since:
    14.0.5
    See Also:
    SecurityProfile, assignSecurityProfile(String, String, SecurityProfileType, String)


    © Copyright 2016 SAP SE or an SAP affiliate company. All rights reserved.