SAP NetWeaver '04

com.sap.netweaver.bc.rf.common.security
Class Permission

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.common_api.jar]
java.lang.Object
  |
  +--com.sap.netweaver.bc.rf.util.flyweight.FlyWeight
        |
        +--com.sap.netweaver.bc.rf.common.security.Permission
All Implemented Interfaces:
java.lang.Cloneable, IPermission, java.io.Serializable
Direct Known Subclasses:
Permission

public class Permission
extends FlyWeight
implements IPermission, java.lang.Cloneable, java.io.Serializable

Class implementing permission.

See Also:
Serialized Form

Field Summary
protected  java.lang.String localName
           
protected  java.lang.String name
           
static IPermission PERMISSION_CREATE
           
static IPermission PERMISSION_DELETE
           
static IPermission PERMISSION_DELETE_NODE
           
static IPermission PERMISSION_LIST
           
static IPermission PERMISSION_READ_CONTENT
           
static IPermission PERMISSION_READ_NODE_PROPERTIES
           
static IPermission PERMISSION_READ_PROPERTIES
           
static IPermission PERMISSION_WRITE_CONTENT
           
static IPermission PERMISSION_WRITE_NODE_PROPERTIES
           
static IPermission PERMISSION_WRITE_PROPERTIES
           
 
Constructor Summary
protected Permission(java.lang.String fullName, ResourceBundles resourceBundles)
          Construct object of class Permission.
 
Method Summary
 java.lang.Object clone()
          Clone this permission.
 boolean equals(java.lang.Object obj)
          Compare this and another object for equality.
 java.lang.String getDescription()
          Get description of permission.
 java.lang.String getDescription(java.util.Locale locale)
          Get localized description of permission.
 java.lang.String getLocalName()
          Get the local name of the permission, i.e. without the namespace prefix
 java.lang.String getName()
          Get unique name of permission.
static IPermission getPermission(java.lang.String fullName)
          Get permission (all permissions are cached for performance and internationalization reasons and indexed by their full name).
 int hashCode()
          Get hashcode for this permission.
 java.lang.String toString()
          Get descriptive text for this permission.
 
Methods inherited from class com.sap.netweaver.bc.rf.util.flyweight.FlyWeight
getAllFlyWeights, getAllFlyWeightsInherited, getFlyWeight, getFlyWeightId, getFlyWeightInherited, removeAllFlyWeights, removeAllFlyWeightsInherited, removeFlyWeight, removeFlyWeightInherited
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name

localName

protected final java.lang.String localName

PERMISSION_READ_CONTENT

public static final IPermission PERMISSION_READ_CONTENT

PERMISSION_READ_PROPERTIES

public static final IPermission PERMISSION_READ_PROPERTIES

PERMISSION_WRITE_CONTENT

public static final IPermission PERMISSION_WRITE_CONTENT

PERMISSION_WRITE_PROPERTIES

public static final IPermission PERMISSION_WRITE_PROPERTIES

PERMISSION_DELETE

public static final IPermission PERMISSION_DELETE

PERMISSION_LIST

public static final IPermission PERMISSION_LIST

PERMISSION_CREATE

public static final IPermission PERMISSION_CREATE

PERMISSION_READ_NODE_PROPERTIES

public static final IPermission PERMISSION_READ_NODE_PROPERTIES

PERMISSION_WRITE_NODE_PROPERTIES

public static final IPermission PERMISSION_WRITE_NODE_PROPERTIES

PERMISSION_DELETE_NODE

public static final IPermission PERMISSION_DELETE_NODE
Constructor Detail

Permission

protected Permission(java.lang.String fullName,
                     ResourceBundles resourceBundles)
Construct object of class Permission.
Parameters:
resourceBundles - resource bundle
fullName -  
Method Detail

getName

public java.lang.String getName()
Get unique name of permission. IPermission implementations are handled by one security sub manager for which they must be implemented and be unique.
Specified by:
getName in interface IPermission
Returns:
unique name of permission

getDescription

public java.lang.String getDescription()
Get description of permission.
Specified by:
getDescription in interface IPermission
Returns:
description of permission

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Get localized description of permission.
Specified by:
getDescription in interface IPermission
Parameters:
locale - locale to be used for localization
Returns:
localized description of permission

toString

public java.lang.String toString()
Get descriptive text for this permission.
Overrides:
toString in class FlyWeight
Returns:
descriptive text for this permission

hashCode

public final int hashCode()
Get hashcode for this permission.
Overrides:
hashCode in class FlyWeight
Returns:
hashcode for this permission

equals

public final boolean equals(java.lang.Object obj)
Compare this and another object for equality. Works only fine when handling objects of classes loaded by same class classloader.
Overrides:
equals in class FlyWeight
Parameters:
obj - object to be compared against
Returns:
result of comparison

clone

public final java.lang.Object clone()
Clone this permission. The clone method will always return the same instance for faster equality comparison. This is not harmful, since the permission is immutable.
Overrides:
clone in class FlyWeight
Returns:
this permission

getPermission

public static IPermission getPermission(java.lang.String fullName)
Get permission (all permissions are cached for performance and internationalization reasons and indexed by their full name). If it isn't available, it won't be created, because it's internationalization information must be provided by the permission originator first before clients are allowed to us it.
Parameters:
fullName - permission full name
Returns:
 

getLocalName

public java.lang.String getLocalName()
Description copied from interface: IPermission
Get the local name of the permission, i.e. without the namespace prefix
Specified by:
getLocalName in interface IPermission
Following copied from interface: com.sap.netweaver.bc.rf.common.security.IPermission
Returns:
localName

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.