Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.5)

E22562-01

oracle.apps.fnd.applcore.audit.ui.util
Class AuditSecurity

java.lang.Object
  extended by oracle.apps.fnd.applcore.audit.ui.util.AuditSecurity

public class AuditSecurity
extends java.lang.Object

This is a class that uses FND Data Security to secure the resources that have been tagged. Implementers of this class can if need override method getDataSecurityObjectName(). In addition, if need be they can override the default implementation of getPrimaryKey(String primaryKey), getPrivilegeName(String primaryKey) and getCompositePrimaryKeySeparator(String primaryKey) methods. This class uses DataSecurityAM instance to do Data Security checks of the resources being secured. It has to be noted that the lifecycle of the DataSecurityAM is the same as the lifecycle of the DBTransaction instance returned by getDBTransaction() concrete method, that needs to be implemnted by the developer. The default implementation of getPrimaryKey(String primaryKey) assumes that the primaryKey represents the primary key of the object and if it holds a composite primary key, the elements of the key are separated by ".". The default implementation of getPrivilegeName(String primaryKey) assumes that the "read" privilege is used to secure the resource. The default implementation of getCompositePrimaryKeySeparator(primaryKey) assumes that the seperator is ".". This class can also do Function Security check if needed. This requires that the following 3 methods be overloaded. getFSPermissionName(), getFSPermissionAction() and getFSPermissionClass(). The default implementation returns null and no function security check is done. getFSPermissionName() - should provide the name of the permission to check. ex PURCHASE_ORDER_REGION getFSPermissionAction() - should provide the action for the permission, e.g. view, invoke etc. getFSPermissionClass() - should provide the class name that implements the permission, etc. RegionPermission, MethodPermission, or TaskflowPermission For function security check to work, this class requires a code permission grant.


Constructor Summary
AuditSecurity()
           
 
Method Summary
static boolean checkPermission(java.security.Permission functionPerm)
           
 java.lang.String getCompositePrimaryKeySeparator(java.lang.String primaryKey)
          The separator used to separate the different parts of the composite primary key, which is concatenated together in primaryKey.
 java.util.List<java.lang.String> getDataSecuredPKList(java.util.List<java.lang.String> primaryKey, java.lang.String objName)
           
 java.lang.String getDataSecurityObjectName()
           
 java.lang.String getDataSecurityObjectName(java.lang.String primaryKey)
          Gives the name of the object that is secured as defined in FND Data Security system.
 java.lang.String getDataSecurityPrivilegeName()
           
 oracle.jbo.server.DBTransaction getDBTransaction()
          Provides a DBTransaction instance that can be used to create a Data Security AM instance that can be used to test tag resource security.
 java.lang.String getFSPermissionAction()
          Provides the action for the permission, e.g.
 java.lang.String getFSPermissionClass()
          provide the class name that implements the permission, etc.
 java.lang.String getFSPermissionName()
          Provides the name of the permission to check.
 java.lang.String getPrivilegeName(java.lang.String primaryKey)
          The privilege name to use to secure the tags.
 DataSecurityAMImpl getSecurityAM()
          Deprecated.  
 void setDataSecurityObjectName(java.lang.String dataSecurityObjectName)
           
 void setDataSecurityPrivilegeName(java.lang.String dataSecurityPrivilegeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditSecurity

public AuditSecurity()
Method Detail

getDataSecuredPKList

public java.util.List<java.lang.String> getDataSecuredPKList(java.util.List<java.lang.String> primaryKey,
                                                             java.lang.String objName)

getSecurityAM

public DataSecurityAMImpl getSecurityAM()
Deprecated. 

For Internal ApplCore use only. Provides a DataSecurityAM instance that can be used to do data security checks for tagged resources. DO NOT USE THIS METHOD. IT WILL RESULT IN A CONN LEAK. The defualt implementation tries to find or create an instance of DataSecurityAM from the DBTransaction instance provided by getDBTransaction() method. The implementation is such tht the lifecycle of the Data Security AM is tied to the lifecycle of the DBTransaction instace returned by getDBTransaction() method.

Returns:
DataSecurityAM instance.
See Also:
getDBTransaction(), getSecurityAMInternal

getPrivilegeName

public java.lang.String getPrivilegeName(java.lang.String primaryKey)
The privilege name to use to secure the tags. The default implementation assumes it is "read" privilege.

Returns:
- Privilege Name to use to do tag security check.

getCompositePrimaryKeySeparator

public java.lang.String getCompositePrimaryKeySeparator(java.lang.String primaryKey)
The separator used to separate the different parts of the composite primary key, which is concatenated together in primaryKey. The default implementation returns ".". If it is not the default, override this method.

Parameters:
primaryKey -
Returns:
- The composite Primary key separator as used in primaryKey. The default value is "."

getFSPermissionName

public java.lang.String getFSPermissionName()
Provides the name of the permission to check. ex PURCHASE_ORDER_REGION. This method needs to be overloaded if you want Function Security check.

Returns:

getFSPermissionAction

public java.lang.String getFSPermissionAction()
Provides the action for the permission, e.g. view, invoke etc.

Returns:

getFSPermissionClass

public java.lang.String getFSPermissionClass()
provide the class name that implements the permission, etc. RegionPermission, MethodPermission, or TaskflowPermission

Returns:

checkPermission

public static boolean checkPermission(java.security.Permission functionPerm)

getDataSecurityObjectName

public java.lang.String getDataSecurityObjectName(java.lang.String primaryKey)
Gives the name of the object that is secured as defined in FND Data Security system. The implementers of this class need to implement this method.

Parameters:
primaryKey -
Returns:
- Object name of the resource secured in Data Security system.

setDataSecurityObjectName

public void setDataSecurityObjectName(java.lang.String dataSecurityObjectName)

getDataSecurityObjectName

public java.lang.String getDataSecurityObjectName()

setDataSecurityPrivilegeName

public void setDataSecurityPrivilegeName(java.lang.String dataSecurityPrivilegeName)

getDataSecurityPrivilegeName

public java.lang.String getDataSecurityPrivilegeName()

getDBTransaction

public oracle.jbo.server.DBTransaction getDBTransaction()
Provides a DBTransaction instance that can be used to create a Data Security AM instance that can be used to test tag resource security. The default implementation returns null.

Returns:
- instance of DBTransaction associated with the root Application Module used by the page in which Tag Search is performed.

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.5)

E22562-01

Copyright © 2011 Oracle. All Rights Reserved.