com.sap.sl.sdk.authoring.security
Interface SecurityFactory


public interface SecurityFactory

Provides methods to create data security profiles and business security profiles.

The interface also provides methods to create the "Rows" and "Tables" settings of data security profiles. You create a SecurityFactory instance by using SlContext.getService(Class).


Method Summary
 BusinessSecurityProfile createBusinessSecurityProfile()
          Creates an empty business security profile.
 ConnectionMapping createConnectionMapping(java.lang.String originalConnectionPath, java.lang.String replacementConnectionPath)
          Creates a new connection mapping in the data security profile.
 DataSecurityProfile createDataSecurityProfile()
          Creates an empty data security profile.
 Principal createPrincipal()
          Creates an empty principal.
 RowRestriction createRowRestriction(java.lang.String table, java.lang.String whereClause)
          Creates a new row restriction in the data security profile.
 TableMapping createTableMapping(java.lang.String originalTable, java.lang.String replacementTable)
          Creates a new table mapping in the data security profile.
 

Method Detail

createDataSecurityProfile

DataSecurityProfile createDataSecurityProfile()
Creates an empty data security profile.

Returns:
A DataSecurityProfile object that represents a data security profile
Since:
14.0.5
See Also:
SecurityProfile, DataSecurityProfile

createRowRestriction

RowRestriction createRowRestriction(java.lang.String table,
                                    java.lang.String whereClause)
Creates a new row restriction in the data security profile.

Parameters:
table - The name of the restricted table
whereClause - The WHERE clause of the restriction
Returns:
A RowRestriction object that represents the row restriction created. It can be modified by setting the table or the WHERE clause.
Since:
14.0.5

createTableMapping

TableMapping createTableMapping(java.lang.String originalTable,
                                java.lang.String replacementTable)
Creates a new table mapping in the data security profile.

Parameters:
originalTable - The full name of the original table to be mapped. The full name can be obtained by using DataFoundationService.getTableFullName(String, String, String).
replacementTable - The name of the table replacing the original one. No check will be done before use.
Returns:
A TableMapping object that maps the original table to the replacement table. Use DataFoundationService to retrieve the table names.
Since:
14.0.5

createConnectionMapping

ConnectionMapping createConnectionMapping(java.lang.String originalConnectionPath,
                                          java.lang.String replacementConnectionPath)
Creates a new connection mapping in the data security profile.

The connection mapping contains a map that ensures the connection replacement between the universe connections and a list of connections stored in the CMS repository.

Parameters:
originalConnectionPath - The path of the original connection attached to the universe. You can use the CmsResourceService.getUniverseConnections(String) method to know the path of the connections attached to the published universe and then to enter the right original connection path.
replacementConnectionPath - The path of the replacement connection stored in the CMS

A connection can be replaced only with a connection of the same type:
  • A relational connection with a relational connection
  • An SAP BW connection with an SAP BW connection
  • A SAS connection with a SAS connection

For multisource-enabled universes, if the replacement connection has not been deployed on the Data Federation Query Server, this is done automatically when the mapping is defined. You can also replace a connection with one that is already used by the universe.

For CMS-specific implementation, specify the Connections root folder, for example: /Connections/myCmsFolder/Connection or /Connections/Connection if the file has been stored directly under the root folder.

Returns:
A ConnectionMapping object that maps the original connection path to the replacement connection path
Since:
14.0.5
See Also:
ConnectionMapping

createBusinessSecurityProfile

BusinessSecurityProfile createBusinessSecurityProfile()
Creates an empty business security profile.

Returns:
A BusinessSecurityProfile object that represents a business security profile
Since:
14.0.5
See Also:
SecurityProfile, BusinessSecurityProfile

createPrincipal

Principal createPrincipal()
Creates an empty principal.

Returns:
A Principal object that represents a principal
Since:
14.0.5
See Also:
SecurityProfile


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