com.sap.netweaver.coll.attachment

Class AttachmentSecurityManager

java.lang.Object
  extended by com.sapportals.wcm.repository.manager.AbstractRepositorySubManager
      extended by com.sap.netweaver.coll.attachment.AttachmentSecurityManager
All Implemented Interfaces:
ISecurityManager

public class AttachmentSecurityManager
extends com.sapportals.wcm.repository.manager.AbstractRepositorySubManager
implements ISecurityManager


Field Summary
 
Fields inherited from class com.sapportals.wcm.repository.manager.AbstractRepositorySubManager
repositoryManager
 
Constructor Summary
AttachmentSecurityManager(IRepositoryManager manager)
           
 
Method Summary
 IPermission getCorrectPermission(IPermission permission, IResource attaRes, IResource orgRes)
           
 IPermission getPermission(String name)
          Returns the IPermission object for a supported permission with a given name
 IPermissionList getSupportedPermissions(IResource resource)
          Returns a a list of permissions which are supported by the security manager for a specific resource (the result depends on wether the resource is a collection or not)
 String getType()
          Returns the type attribute of this security manager.
 boolean isAllowed(IResource resource, com.sapportals.portal.security.usermanagement.IUser user, IPermission permission)
          Deprecated. As of NetWeaver 7.1, replaced by isAllowed(IResource,com.sap.security.api.IUser,IPermission)
 boolean isAllowed(IResource resource, com.sap.security.api.IUser user, IPermission permission)
          Checks, whether a user has a specific permission on a specific resource
 boolean isAllowed(IResource resource, com.sapportals.portal.security.usermanagement.IUser user, IPermissionList permissions)
          Deprecated. As of NetWeaver 7.1, replaced by isAllowed(IResource,com.sap.security.api.IUser,IPermissionList)
 boolean isAllowed(IResource resource, com.sap.security.api.IUser user, IPermissionList permissions)
          Checks, whether a user has some permissions on a specific resource
 com.sapportals.wcm.util.uri.IRidSet isAllowed(com.sapportals.wcm.util.uri.IRidList ridList, com.sapportals.portal.security.usermanagement.IUser user, IPermissionList permissions, IResourceContext context)
          Deprecated. As of NetWeaver 7.1, replaced by isAllowed(IRidList,com.sap.security.api.IUser,IPermissionList,IResourceContext)
 com.sapportals.wcm.util.uri.IRidSet isAllowed(com.sapportals.wcm.util.uri.IRidList ridList, com.sap.security.api.IUser user, IPermissionList permissions, IResourceContext context)
          Checks, whether a user has some permissions on all specified resources.
 
Methods inherited from class com.sapportals.wcm.repository.manager.AbstractRepositorySubManager
checkAuthorization, getSecurity, readExternalContent, sendEvent, sendEvent, shutDown, startUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentSecurityManager

public AttachmentSecurityManager(IRepositoryManager manager)
Method Detail

getType

public String getType()
Description copied from interface: ISecurityManager
Returns the type attribute of this security manager.

Specified by:
getType in interface ISecurityManager
Returns:
type

getSupportedPermissions

public IPermissionList getSupportedPermissions(IResource resource)
                                        throws ResourceException
Description copied from interface: ISecurityManager
Returns a a list of permissions which are supported by the security manager for a specific resource (the result depends on wether the resource is a collection or not)

Specified by:
getSupportedPermissions in interface ISecurityManager
Parameters:
resource - the resource
Returns:
the supported permissions
Throws:
ResourceException - the resource RID could not be determined

getPermission

public IPermission getPermission(String name)
Description copied from interface: ISecurityManager
Returns the IPermission object for a supported permission with a given name

Specified by:
getPermission in interface ISecurityManager
Parameters:
name - the permission name
Returns:
the IPermission object - null if the permission is not supported.

isAllowed

public boolean isAllowed(IResource resource,
                         com.sapportals.portal.security.usermanagement.IUser user,
                         IPermission permission)
                  throws ResourceException
Deprecated. As of NetWeaver 7.1, replaced by isAllowed(IResource,com.sap.security.api.IUser,IPermission)

Description copied from interface: ISecurityManager
Checks, whether a user has a specific permission on a specific resource

Specified by:
isAllowed in interface ISecurityManager
Parameters:
resource - the resource
user - the user ID
permission - the permission
Returns:
true if the permission is granted
Throws:
ResourceException - the resource RID could not be determined

isAllowed

public boolean isAllowed(IResource resource,
                         com.sap.security.api.IUser user,
                         IPermission permission)
                  throws ResourceException
Description copied from interface: ISecurityManager
Checks, whether a user has a specific permission on a specific resource

Specified by:
isAllowed in interface ISecurityManager
Parameters:
resource - the resource
user - the user ID
permission - the permission
Returns:
true if the permission is granted
Throws:
ResourceException - the resource RID could not be determined

isAllowed

public com.sapportals.wcm.util.uri.IRidSet isAllowed(com.sapportals.wcm.util.uri.IRidList ridList,
                                                     com.sapportals.portal.security.usermanagement.IUser user,
                                                     IPermissionList permissions,
                                                     IResourceContext context)
                                              throws ResourceException
Deprecated. As of NetWeaver 7.1, replaced by isAllowed(IRidList,com.sap.security.api.IUser,IPermissionList,IResourceContext)

Description copied from interface: ISecurityManager
Checks, whether a user has some permissions on all specified resources. A RID from the input list must be contained int the returned list if the user has all the permissions in the permission list.

Specified by:
isAllowed in interface ISecurityManager
Parameters:
ridList - A list of resource identifiers to check
user - the user ID
permissions - A list of permission
context - The resource context
Returns:
A set of RIDs
Throws:
ResourceException - the resource RID could not be determined

isAllowed

public com.sapportals.wcm.util.uri.IRidSet isAllowed(com.sapportals.wcm.util.uri.IRidList ridList,
                                                     com.sap.security.api.IUser user,
                                                     IPermissionList permissions,
                                                     IResourceContext context)
                                              throws ResourceException
Description copied from interface: ISecurityManager
Checks, whether a user has some permissions on all specified resources. A RID from the input list must be contained int the returned list if the user has all the permissions in the permission list.

Specified by:
isAllowed in interface ISecurityManager
Parameters:
ridList - A list of resource identifiers to check
user - the user ID
permissions - A list of permission
context - The resource context
Returns:
A set of RIDs
Throws:
ResourceException - the resource RID could not be determined
Since:
NetWeaver 7.1

isAllowed

public boolean isAllowed(IResource resource,
                         com.sapportals.portal.security.usermanagement.IUser user,
                         IPermissionList permissions)
                  throws ResourceException
Deprecated. As of NetWeaver 7.1, replaced by isAllowed(IResource,com.sap.security.api.IUser,IPermissionList)

Description copied from interface: ISecurityManager
Checks, whether a user has some permissions on a specific resource

Specified by:
isAllowed in interface ISecurityManager
Parameters:
resource - the resource
user - the user ID
permissions - A list of permission
Returns:
true if the permission is granted
Throws:
ResourceException - the resource RID could not be determined

isAllowed

public boolean isAllowed(IResource resource,
                         com.sap.security.api.IUser user,
                         IPermissionList permissions)
                  throws ResourceException
Description copied from interface: ISecurityManager
Checks, whether a user has some permissions on a specific resource

Specified by:
isAllowed in interface ISecurityManager
Parameters:
resource - the resource
user - the user ID
permissions - A list of permission
Returns:
true if the permission is granted
Throws:
ResourceException - the resource RID could not be determined
Since:
NetWeaver 7.1

getCorrectPermission

public IPermission getCorrectPermission(IPermission permission,
                                        IResource attaRes,
                                        IResource orgRes)


Copyright 2011 SAP AG Complete Copyright Notice