SAP NetWeaver '04

com.sapportals.wcm.util.systemconfig
Class SystemConfig

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.util.systemconfig.SystemConfig

public class SystemConfig
extends java.lang.Object

Main entry point for retrieving the ISystemPrincipals.


Method Summary
 SystemPrincipal addSystemPrincipal(java.lang.String configID, com.sapportals.portal.security.usermanagement.IUMPrincipal principal, java.lang.String[] permissions, boolean canChangePermissions, boolean hasServiceAcls, boolean isLockBreaker)
          create a new system principal with the given id for the given principal with the permissions specified.
 boolean canChangePermissions(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
          Check, if a given principal is a system principal which is authorized to change permissions.
static SystemConfig getInstance()
          Get an instance of the SystemConfig (singleton).
 ISystemPrincipalList getSystemGroups()
          Get a list of all system groups.
 ISystemPrincipalList getSystemPrincipals()
          Get a list of all system principals (users, groups and roles).
 ISystemPrincipalList getSystemRoles()
          Get a list of all system roles.
 ISystemPrincipalList getSystemUsers()
          Get a list of all system users.
 boolean hasPermission(com.sapportals.portal.security.usermanagement.IUser user, java.lang.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, java.lang.String[] permissions)
          Check if a given user is a system principal and has the requested permissions (mass call for hasPermissions(IUser, String[])).
 boolean hasServiceAcls(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
          Check, if a given principal has all service acls.
 
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 java.lang.Exception
Get an instance of the SystemConfig (singleton).
Returns:
the instance of the SystemConfig
Throws:
java.lang.Exception - Exception raised in failure situation

getSystemUsers

public ISystemPrincipalList getSystemUsers()
Get a list of all system users.
Returns:
list of all system users

getSystemGroups

public ISystemPrincipalList getSystemGroups()
Get a list of all system groups.
Returns:
list of all system groups

getSystemRoles

public ISystemPrincipalList getSystemRoles()
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

hasPermission

public boolean hasPermission(com.sapportals.portal.security.usermanagement.IUser user,
                             java.lang.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

hasPermissions

public boolean hasPermissions(com.sapportals.portal.security.usermanagement.IUser user,
                              java.lang.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

canChangePermissions

public boolean canChangePermissions(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
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.

hasServiceAcls

public boolean hasServiceAcls(com.sapportals.portal.security.usermanagement.IUMPrincipal principal)
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.

addSystemPrincipal

public SystemPrincipal addSystemPrincipal(java.lang.String configID,
                                          com.sapportals.portal.security.usermanagement.IUMPrincipal principal,
                                          java.lang.String[] permissions,
                                          boolean canChangePermissions,
                                          boolean hasServiceAcls,
                                          boolean isLockBreaker)
                                   throws java.lang.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
Returns:
the added system principal
Throws:
java.lang.Exception - if the configID or principal is empty, or if the given configID already exists

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.