com.sapportals.wcm.util.systemconfig

Class SystemConfig

java.lang.Object
  extended by com.sapportals.wcm.util.systemconfig.SystemConfig

public class SystemConfig
extends Object

Main entry point for retrieving the ISystemPrincipals.


Method Summary
 SystemPrincipal addSystemPrincipal(String configID, IPrincipal principal, String[] permissions, boolean canChangePermissions, boolean hasServiceAcls, boolean isLockBreaker, boolean canChangeSystemProperties, boolean isAudited)
          create a new system principal with the given id for the given principal with the permissions specified.
 SystemPrincipal addSystemPrincipal(String configID, com.sapportals.portal.security.usermanagement.IUMPrincipal principal, String[] permissions, boolean canChangePermissions, boolean hasServiceAcls, boolean isLockBreaker, boolean canChangeSystemProperties)
          Deprecated. As of NetWeaver 7.1, replaced by addSystemPrincipal(String,com.sap.security.api.IPrincipal,String[],boolean,boolean,boolean,boolean,boolean)
 boolean canChangePermissions(IPrincipal principal)
          Check, if a given principal is a system principal which is authorized to change permissions.
 boolean canChangePermissions(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
          Deprecated. As of NetWeaver 7.1, replaced by canChangePermissions(com.sap.security.api.IPrincipal)
 boolean canChangeSystemProperties(IPrincipal principal)
          Check, if a given principal is a system principal which is authorized to set system properties.
static SystemConfig getInstance()
          Get an instance of the SystemConfig (singleton).
 ISystemPrincipalList getSystemGroups()
          Deprecated. As of NetWeaver 7.1, please use getSystemPrincipals() instead
 ISystemPrincipalList getSystemPrincipals()
          Get a list of all system principals (users, groups and roles).
 ISystemPrincipalList getSystemRoles()
          Deprecated. As of NetWeaver 7.1, please use getSystemPrincipals() instead
 ISystemPrincipalList getSystemUsers()
          Deprecated. As of NetWeaver 7.1, please use getSystemPrincipals() instead
 boolean hasPermission(com.sapportals.portal.security.usermanagement.IUser user, String permission)
          Deprecated. As of NetWeaver 7.1, replaced by hasPermission(com.sap.security.api.IUser,String)
 boolean hasPermission(IUser user, String permission)
          Check if a given user is a system principal and has the requested permission.
 boolean hasPermissions(com.sapportals.portal.security.usermanagement.IUser user, String[] permissions)
          Deprecated. As of NetWeaver 7.1, replaced by hasPermissions(com.sap.security.api.IUser,String[])
 boolean hasPermissions(IUser user, String[] permissions)
          Check if a given user is a system principal and has the requested permissions (mass call for hasPermissions(IUser, String[])).
 boolean hasServiceAcls(IPrincipal principal)
          Check, if a given principal has all service acls.
 boolean hasServiceAcls(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
          Deprecated. As of NetWeaver 7.1, replaced by hasServiceAcls(com.sap.security.api.IPrincipal)
 boolean isAudited(com.sapportals.portal.security.usermanagement.IUser user)
          Check if actions of a given principal should be audited.
 boolean isLockBreaker(IUser user)
          Check, if a given user is a system principal, which is authorized to break the lock of another user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SystemConfig getInstance()
                                throws Exception
Get an instance of the SystemConfig (singleton).

Returns:
the instance of the SystemConfig
Throws:
Exception - Exception raised in failure situation

getSystemUsers

public ISystemPrincipalList getSystemUsers()
Deprecated. As of NetWeaver 7.1, please use getSystemPrincipals() instead

Get a list of all system users.

Returns:
list of all system users

getSystemGroups

public ISystemPrincipalList getSystemGroups()
Deprecated. As of NetWeaver 7.1, please use getSystemPrincipals() instead

Get a list of all system groups.

Returns:
list of all system groups

getSystemRoles

public ISystemPrincipalList getSystemRoles()
Deprecated. As of NetWeaver 7.1, please use getSystemPrincipals() instead

Get a list of all system roles.

Returns:
list of all system roles

getSystemPrincipals

public ISystemPrincipalList getSystemPrincipals()
Get a list of all system principals (users, groups and roles).

Returns:
list of all system principals

isAudited

public boolean isAudited(com.sapportals.portal.security.usermanagement.IUser user)
Check if actions of a given principal should be audited.

Parameters:
user - the IUser to check
Returns:
true if actions of the user should be audited, false otherwise

hasPermission

public boolean hasPermission(com.sapportals.portal.security.usermanagement.IUser user,
                             String permission)
Deprecated. As of NetWeaver 7.1, replaced by hasPermission(com.sap.security.api.IUser,String)

Check if a given user is a system principal and has the requested permission.

Parameters:
user - the IUser to check
permission - the String with the requested permission's name
Returns:
true if the user is a system principal and has the specified permission

hasPermission

public boolean hasPermission(IUser user,
                             String permission)
Check if a given user is a system principal and has the requested permission.

Parameters:
user - the IUser to check
permission - the String with the requested permission's name
Returns:
true if the user is a system principal and has the specified permission
Since:
NetWeaver 7.1

hasPermissions

public boolean hasPermissions(com.sapportals.portal.security.usermanagement.IUser user,
                              String[] permissions)
Deprecated. As of NetWeaver 7.1, replaced by hasPermissions(com.sap.security.api.IUser,String[])

Check if a given user is a system principal and has the requested permissions (mass call for hasPermissions(IUser, String[])).

Parameters:
user - the IUser to check
permissions - an array of Strings with the requested permissions' name
Returns:
true if the user is a system principal and has all the specified permissions

hasPermissions

public boolean hasPermissions(IUser user,
                              String[] permissions)
Check if a given user is a system principal and has the requested permissions (mass call for hasPermissions(IUser, String[])).

Parameters:
user - the IUser to check
permissions - an array of Strings with the requested permissions' name
Returns:
true if the user is a system principal and has all the specified permissions
Since:
NetWeaver 7.1

canChangePermissions

public boolean canChangePermissions(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
Deprecated. As of NetWeaver 7.1, replaced by canChangePermissions(com.sap.security.api.IPrincipal)

Check, if a given principal is a system principal which is authorized to change permissions.

Parameters:
principal - the IUMPrincipal to check
Returns:
true if the user is a system principal which is authorized to change permissions.

canChangePermissions

public boolean canChangePermissions(IPrincipal principal)
                             throws UMException
Check, if a given principal is a system principal which is authorized to change permissions.

Parameters:
principal - the IUMPrincipal to check
Returns:
true if the user is a system principal which is authorized to change permissions.
Throws:
UMException
Since:
NetWeaver 7.1

canChangeSystemProperties

public boolean canChangeSystemProperties(IPrincipal principal)
                                  throws UMException
Check, if a given principal is a system principal which is authorized to set system properties.

Parameters:
principal - the IUMPrincipal to check
Returns:
true if the user is a system principal which is authorized to set system properties.
Throws:
UMException
Since:
NetWeaver 7.1

hasServiceAcls

public boolean hasServiceAcls(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
Deprecated. As of NetWeaver 7.1, replaced by hasServiceAcls(com.sap.security.api.IPrincipal)

Check, if a given principal has all service acls.

Parameters:
principal - the IUMPrincipal to check
Returns:
true if the user is a system principal which is authorized to all service acls.

hasServiceAcls

public boolean hasServiceAcls(IPrincipal principal)
                       throws UMException
Check, if a given principal has all service acls.

Parameters:
principal - the IUMPrincipal to check
Returns:
true if the user is a system principal which is authorized to all service acls.
Throws:
UMException
Since:
NetWeaver 7.1

addSystemPrincipal

public SystemPrincipal addSystemPrincipal(String configID,
                                          com.sapportals.portal.security.usermanagement.IUMPrincipal principal,
                                          String[] permissions,
                                          boolean canChangePermissions,
                                          boolean hasServiceAcls,
                                          boolean isLockBreaker,
                                          boolean canChangeSystemProperties)
                                   throws Exception
Deprecated. As of NetWeaver 7.1, replaced by addSystemPrincipal(String,com.sap.security.api.IPrincipal,String[],boolean,boolean,boolean,boolean,boolean)

create a new system principal with the given id for the given principal with the permissions specified.

Parameters:
configID - the id for the system principal to use in the config
principal - the IUMPrincipal to create a system principal config entry for
permissions - an array of permissions that are to be granted to the system principal
canChangePermissions - the value for the system principal's change_permissions flag
isLockBreaker - the value for the system principal's lock_breaker flag
hasServiceAcls - the value for the system principal's serviceacls flag
canChangeSystemProperties - the value for the system principal's set_systemproperties flag
Returns:
the added system principal
Throws:
Exception - if the configID or principal is empty, or if the given configID already exists

addSystemPrincipal

public SystemPrincipal addSystemPrincipal(String configID,
                                          IPrincipal principal,
                                          String[] permissions,
                                          boolean canChangePermissions,
                                          boolean hasServiceAcls,
                                          boolean isLockBreaker,
                                          boolean canChangeSystemProperties,
                                          boolean isAudited)
                                   throws Exception
create a new system principal with the given id for the given principal with the permissions specified.

Parameters:
configID - the id for the system principal to use in the config
principal - the IUMPrincipal to create a system principal config entry for
permissions - an array of permissions that are to be granted to the system principal
canChangePermissions - the value for the system principal's change_permissions flag
isLockBreaker - the value for the system principal's lock_breaker flag
hasServiceAcls - the value for the system principal's serviceacls flag
canChangeSystemProperties - the value for the system principal's set_systemproperties flag
isAudited - the value for the system principal's isAudited flag
Returns:
the added system principal
Throws:
Exception - if the configID or principal is empty, or if the given configID already exists
Since:
NetWeaver 7.1

isLockBreaker

public boolean isLockBreaker(IUser user)
                      throws UMException
Check, if a given user is a system principal, which is authorized to break the lock of another user.

Parameters:
user - the IUser to check.
Returns:
true if the user is a system principal which is authorized to unlock an existing lock of another user.
Throws:
UMException
Since:
NetWeaver 7.1
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice