com.softwareag.centrasite.policy.api
Interface IPolicyClient


public interface IPolicyClient

Communication interface with PolicyEngine.

See Also:
PolicyClientFactory

Method Summary
 void clearPolicyCache()
          For each top-level save objects call from JAXR, the list of policies applicable for a (objectType, eventType) pair will be cached in the policy client This method will clear the cache of policies.
 void continuePolicyAction(java.lang.String executeAsUser, java.lang.String password, PolicyActionInstance policyAction, ResultStatus status, java.lang.String sessionId, java.lang.String message)
           
 void continuePolicyAction(java.lang.String executeAsUser, java.lang.String password, PolicyActionInstance policyAction, ResultStatus status, java.lang.String sessionId, java.lang.String message, boolean useSameConnection)
           
 IPolicyStatus executeConsumerRegistration(javax.xml.registry.infomodel.RegistryObject asset, java.lang.String requestId, java.lang.String usersAndGroupIds, java.lang.String consumerApplicationIds)
          Submits Consumer Registration event to the Policy Engine
 IPolicyStatus executePostDelete(javax.xml.registry.infomodel.RegistryObject regObj)
          Submits the registry object to the PolicyEngine with PostDelete event.
 IPolicyStatus executePostInsert(javax.xml.registry.infomodel.RegistryObject regObj)
          Submits the registry object to the PolicyEngine with PostInsert event.
 IPolicyStatus executePostStateChange(javax.xml.registry.infomodel.RegistryObject regObj, javax.xml.registry.infomodel.Concept fromState, javax.xml.registry.infomodel.Concept toState)
          Submits PostStateChange event to the Policy Engine
 IPolicyStatus executePostUpdate(javax.xml.registry.infomodel.RegistryObject regObj)
          Submits the registry object to the PolicyEngine with PostUpdate event.
 IPolicyStatus executePreDelete(javax.xml.registry.infomodel.RegistryObject regObj)
          Submits the registry object to the PolicyEngine with PreDelete event.
 IPolicyStatus executePreInsert(javax.xml.registry.infomodel.RegistryObject regObj)
          Submits the registry object to the PolicyEngine with PreInsert event.
 IPolicyStatus executePreStateChange(javax.xml.registry.infomodel.RegistryObject regObj, javax.xml.registry.infomodel.Concept fromState, javax.xml.registry.infomodel.Concept toState)
          Submits preStateChange event to the Policy Engine
 IPolicyStatus executePreUpdate(javax.xml.registry.infomodel.RegistryObject regObj)
          Submits the registry object to the PolicyEngine with PreUpdate event.
 java.util.Collection getContextObjects(java.lang.String qualifier)
          Gets the objects that are available in the policy context under the specified qualifier.
 void log(PolicyActionInstance policyAction, ResultStatus status, java.lang.String sessionId, java.lang.String message)
          logs the entry to all appenders and triggers all registered listeners.
 void log(PolicyActionInstance policyAction, ResultStatus status, java.lang.String sessionId, java.lang.String message, boolean useSameConnection)
          logs the entry to all appenders and triggers all registered listeners.
 void onCollect(javax.xml.registry.infomodel.RegistryObject regObj)
           
 ResultStatus onConsumerRegistration(javax.xml.registry.infomodel.RegistryObject asset, java.lang.String requestId, java.lang.String usersAndGroupIds, java.lang.String consumerApplicationIds)
          Deprecated. 
 void onExport(javax.xml.registry.infomodel.RegistryObject registryObject, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
           
 void onMove(javax.xml.registry.infomodel.RegistryObject regObj)
          Submits the registry object to the PolicyEngine with OnMove event.
 void onPostDelete(javax.xml.registry.infomodel.RegistryObject regObj)
          Deprecated. 
 void onPostInsert(javax.xml.registry.infomodel.RegistryObject regObj)
          Deprecated. 
 void onPostUpdate(javax.xml.registry.infomodel.RegistryObject regObj)
          Deprecated. 
 void onPreDelete(javax.xml.registry.infomodel.RegistryObject regObj)
          Deprecated. 
 void onPreInsert(javax.xml.registry.infomodel.RegistryObject regObj)
          Deprecated. 
 void onPreUpdate(javax.xml.registry.infomodel.RegistryObject regObj)
          Deprecated. 
 java.util.List<java.lang.String> onTrigger(Policy policy, java.util.List<javax.xml.registry.infomodel.RegistryObject> regObjs)
          Returns the collection of Policy Logs
 java.lang.String onTrigger(Policy policy, java.util.List<javax.xml.registry.infomodel.RegistryObject> registryObjects, java.util.List<com.centrasite.jaxr.importexport.IEventCallback> policyCallbackList, java.util.HashMap<java.lang.String,java.lang.Object> additionalInput)
           
 java.lang.String onTrigger(Policy policy, javax.xml.registry.infomodel.RegistryObject regObjs, java.util.Map addlPolicyContextParms)
          Returns the collection of Policy Logs
 ResultStatus postStateChange(javax.xml.registry.infomodel.RegistryObject regObj, javax.xml.registry.infomodel.Concept fromState, javax.xml.registry.infomodel.Concept toState)
          Deprecated. 
 ResultStatus preStateChange(javax.xml.registry.infomodel.RegistryObject regObj, javax.xml.registry.infomodel.Concept fromState, javax.xml.registry.infomodel.Concept toState)
          Deprecated. 
 void resetParameterContext(java.lang.String qualifier)
          Reset the parameter object from the policy context map.
 void setParameterContext(java.lang.String qualifier, java.lang.Object parameters)
          Set a parameter object into the context map for the policy execution with a qualifier.
 

Method Detail

onPreInsert

@Deprecated
void onPreInsert(javax.xml.registry.infomodel.RegistryObject regObj)
                 throws javax.xml.registry.JAXRException,
                        PolicyException
Deprecated. 

Submits the registry object to the PolicyEngine with PreInsert event.

Parameters:
regObj - RegistryObject for which the event is generated.
Throws:
javax.xml.registry.JAXRException
PolicyException

executePreInsert

IPolicyStatus executePreInsert(javax.xml.registry.infomodel.RegistryObject regObj)
                               throws javax.xml.registry.JAXRException,
                                      PolicyException
Submits the registry object to the PolicyEngine with PreInsert event.

Parameters:
regObj -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

onPostInsert

@Deprecated
void onPostInsert(javax.xml.registry.infomodel.RegistryObject regObj)
                  throws javax.xml.registry.JAXRException,
                         PolicyException
Deprecated. 

Submits the registry object to the PolicyEngine with PostInsert event.

Parameters:
regObj - RegistryObject for which the event is generated.
Throws:
javax.xml.registry.JAXRException
PolicyException

executePostInsert

IPolicyStatus executePostInsert(javax.xml.registry.infomodel.RegistryObject regObj)
                                throws javax.xml.registry.JAXRException,
                                       PolicyException
Submits the registry object to the PolicyEngine with PostInsert event.

Parameters:
regObj -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

onPreUpdate

@Deprecated
void onPreUpdate(javax.xml.registry.infomodel.RegistryObject regObj)
                 throws javax.xml.registry.JAXRException,
                        PolicyException
Deprecated. 

Submits the registry object to the PolicyEngine with PreUpdate event.

Parameters:
regObj - RegistryObject for which the event is generated.
Throws:
javax.xml.registry.JAXRException
PolicyException

executePreUpdate

IPolicyStatus executePreUpdate(javax.xml.registry.infomodel.RegistryObject regObj)
                               throws javax.xml.registry.JAXRException,
                                      PolicyException
Submits the registry object to the PolicyEngine with PreUpdate event.

Parameters:
regObj -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

onPostUpdate

@Deprecated
void onPostUpdate(javax.xml.registry.infomodel.RegistryObject regObj)
                  throws javax.xml.registry.JAXRException,
                         PolicyException
Deprecated. 

Submits the registry object to the PolicyEngine with PostUpdate event.

Parameters:
regObj - RegistryObject for which the event is generated.
Throws:
javax.xml.registry.JAXRException
PolicyException

executePostUpdate

IPolicyStatus executePostUpdate(javax.xml.registry.infomodel.RegistryObject regObj)
                                throws javax.xml.registry.JAXRException,
                                       PolicyException
Submits the registry object to the PolicyEngine with PostUpdate event.

Parameters:
regObj -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

onPreDelete

@Deprecated
void onPreDelete(javax.xml.registry.infomodel.RegistryObject regObj)
                 throws javax.xml.registry.JAXRException,
                        PolicyException
Deprecated. 

Submits the registry object to the PolicyEngine with PreDelete event.

Parameters:
regObj - RegistryObject for which the event is generated.
Throws:
javax.xml.registry.JAXRException
PolicyException

executePreDelete

IPolicyStatus executePreDelete(javax.xml.registry.infomodel.RegistryObject regObj)
                               throws javax.xml.registry.JAXRException,
                                      PolicyException
Submits the registry object to the PolicyEngine with PreDelete event.

Parameters:
regObj -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

onPostDelete

@Deprecated
void onPostDelete(javax.xml.registry.infomodel.RegistryObject regObj)
                  throws javax.xml.registry.JAXRException,
                         PolicyException
Deprecated. 

Submits the registry object to the PolicyEngine with PostDelete event.

Parameters:
regObj - RegistryObject for which the event is generated.
Throws:
javax.xml.registry.JAXRException
PolicyException

executePostDelete

IPolicyStatus executePostDelete(javax.xml.registry.infomodel.RegistryObject regObj)
                                throws javax.xml.registry.JAXRException,
                                       PolicyException
Submits the registry object to the PolicyEngine with PostDelete event.

Parameters:
regObj -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

preStateChange

@Deprecated
ResultStatus preStateChange(javax.xml.registry.infomodel.RegistryObject regObj,
                                       javax.xml.registry.infomodel.Concept fromState,
                                       javax.xml.registry.infomodel.Concept toState)
                            throws javax.xml.registry.JAXRException,
                                   PolicyException
Deprecated. 

Submits preStateChange event to the Policy Engine

Parameters:
regObj - RegistryObject for which the state change is initiated
fromState - from state of the Registry Object
toState - to state of the Registry Object
Returns:
returns the status of the policy execution ResultStatus
Throws:
javax.xml.registry.JAXRException
PolicyException

executePreStateChange

IPolicyStatus executePreStateChange(javax.xml.registry.infomodel.RegistryObject regObj,
                                    javax.xml.registry.infomodel.Concept fromState,
                                    javax.xml.registry.infomodel.Concept toState)
                                    throws javax.xml.registry.JAXRException,
                                           PolicyException
Submits preStateChange event to the Policy Engine

Parameters:
regObj -
fromState -
toState -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

postStateChange

@Deprecated
ResultStatus postStateChange(javax.xml.registry.infomodel.RegistryObject regObj,
                                        javax.xml.registry.infomodel.Concept fromState,
                                        javax.xml.registry.infomodel.Concept toState)
                             throws javax.xml.registry.JAXRException,
                                    PolicyException
Deprecated. 

Submits PostStateChange event to the Policy Engine

Parameters:
regObj - RegistryObject for which the state change is initiated
fromState - from state of the Registry Object
toState - to state of the Registry Object
Returns:
returns the status of the policy execution ResultStatus
Throws:
javax.xml.registry.JAXRException
PolicyException

executePostStateChange

IPolicyStatus executePostStateChange(javax.xml.registry.infomodel.RegistryObject regObj,
                                     javax.xml.registry.infomodel.Concept fromState,
                                     javax.xml.registry.infomodel.Concept toState)
                                     throws javax.xml.registry.JAXRException,
                                            PolicyException
Submits PostStateChange event to the Policy Engine

Parameters:
regObj -
fromState -
toState -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

onConsumerRegistration

@Deprecated
ResultStatus onConsumerRegistration(javax.xml.registry.infomodel.RegistryObject asset,
                                               java.lang.String requestId,
                                               java.lang.String usersAndGroupIds,
                                               java.lang.String consumerApplicationIds)
                                    throws javax.xml.registry.JAXRException,
                                           PolicyException
Deprecated. 

Submits Consumer Registration event to the Policy Engine

Parameters:
asset - Asset on which the Request is generated
requestId - Consumer Registration Request
usersAndGroupIds - Users and Groups for which the request is made
consumerApplicationIds - ConsumerApplications for which the request is made
Returns:
returns the status of the policy execution
Throws:
javax.xml.registry.JAXRException
PolicyException

executeConsumerRegistration

IPolicyStatus executeConsumerRegistration(javax.xml.registry.infomodel.RegistryObject asset,
                                          java.lang.String requestId,
                                          java.lang.String usersAndGroupIds,
                                          java.lang.String consumerApplicationIds)
                                          throws javax.xml.registry.JAXRException,
                                                 PolicyException
Submits Consumer Registration event to the Policy Engine

Parameters:
asset -
requestId -
usersAndGroupIds -
consumerApplicationIds -
Returns:
IPolicyStatus interface will be returned for Success, Info and Warning, PolicyException will be thrown in case of failure.
Throws:
javax.xml.registry.JAXRException
PolicyException

onTrigger

java.util.List<java.lang.String> onTrigger(Policy policy,
                                           java.util.List<javax.xml.registry.infomodel.RegistryObject> regObjs)
                                           throws javax.xml.registry.JAXRException,
                                                  PolicyException
Returns the collection of Policy Logs

Parameters:
policy - PolicyInstance to be executed
regObjs - Registry Objects on which the Policy to be executed. If this is empty then all matching objects will be choosen for execution
Returns:
List of PolicyLog as Strings
Throws:
javax.xml.registry.JAXRException
PolicyException

onTrigger

java.lang.String onTrigger(Policy policy,
                           javax.xml.registry.infomodel.RegistryObject regObjs,
                           java.util.Map addlPolicyContextParms)
                           throws javax.xml.registry.JAXRException,
                                  PolicyException
Returns the collection of Policy Logs

Parameters:
policy - PolicyInstance to be executed
regObj - Registry Objects on which the Policy to be executed.
addlPolicyContextParms - Map which would be passed to policy context
Returns:
PolicyLog as Strings
Throws:
javax.xml.registry.JAXRException
PolicyException

log

void log(PolicyActionInstance policyAction,
         ResultStatus status,
         java.lang.String sessionId,
         java.lang.String message)
         throws javax.xml.registry.JAXRException,
                PolicyException
logs the entry to all appenders and triggers all registered listeners.

Parameters:
policyAction - PolicyActionInstance which needs to be logged
status - Status of the execution
sessionId - Id of the session
message - Message of the execution
Throws:
javax.xml.registry.JAXRException
PolicyException

log

void log(PolicyActionInstance policyAction,
         ResultStatus status,
         java.lang.String sessionId,
         java.lang.String message,
         boolean useSameConnection)
         throws javax.xml.registry.JAXRException,
                PolicyException
logs the entry to all appenders and triggers all registered listeners.

Parameters:
policyAction - PolicyActionInstance which needs to be logged
status - Status of the execution
sessionId - Id of the session
message - Message of the execution
useSameConnection -
Throws:
javax.xml.registry.JAXRException
PolicyException

continuePolicyAction

void continuePolicyAction(java.lang.String executeAsUser,
                          java.lang.String password,
                          PolicyActionInstance policyAction,
                          ResultStatus status,
                          java.lang.String sessionId,
                          java.lang.String message)
                          throws javax.xml.registry.JAXRException,
                                 PolicyException
Parameters:
executeAsUser -
policyAction -
status -
sessionId -
message -
Throws:
javax.xml.registry.JAXRException
PolicyException

continuePolicyAction

void continuePolicyAction(java.lang.String executeAsUser,
                          java.lang.String password,
                          PolicyActionInstance policyAction,
                          ResultStatus status,
                          java.lang.String sessionId,
                          java.lang.String message,
                          boolean useSameConnection)
                          throws javax.xml.registry.JAXRException,
                                 PolicyException
Parameters:
executeAsUser -
policyAction -
status -
sessionId -
message -
useSameConnection -
Throws:
javax.xml.registry.JAXRException
PolicyException

clearPolicyCache

void clearPolicyCache()
For each top-level save objects call from JAXR, the list of policies applicable for a (objectType, eventType) pair will be cached in the policy client This method will clear the cache of policies.


onMove

void onMove(javax.xml.registry.infomodel.RegistryObject regObj)
            throws javax.xml.registry.JAXRException,
                   PolicyException
Submits the registry object to the PolicyEngine with OnMove event.

Parameters:
regObj - Registry Object to be moved
Throws:
javax.xml.registry.JAXRException
PolicyException

onCollect

void onCollect(javax.xml.registry.infomodel.RegistryObject regObj)
               throws javax.xml.registry.JAXRException,
                      PolicyException
Parameters:
collectorPolicy -
registryObjects -
Throws:
javax.xml.registry.JAXRException
PolicyException

onTrigger

java.lang.String onTrigger(Policy policy,
                           java.util.List<javax.xml.registry.infomodel.RegistryObject> registryObjects,
                           java.util.List<com.centrasite.jaxr.importexport.IEventCallback> policyCallbackList,
                           java.util.HashMap<java.lang.String,java.lang.Object> additionalInput)
                           throws javax.xml.registry.JAXRException,
                                  PolicyException
Parameters:
policy -
registryObjects -
additionalInput -
Throws:
javax.xml.registry.JAXRException
PolicyException

onExport

void onExport(javax.xml.registry.infomodel.RegistryObject registryObject,
              java.util.Map<java.lang.String,java.lang.Object> parameterMap)
              throws javax.xml.registry.JAXRException,
                     PolicyException
Parameters:
registryObject -
parameters -
Throws:
javax.xml.registry.JAXRException
PolicyException

setParameterContext

void setParameterContext(java.lang.String qualifier,
                         java.lang.Object parameters)
Set a parameter object into the context map for the policy execution with a qualifier.

Parameters:
qualifier - a qualifier (key for the used context Map)
parameters - any parameters

resetParameterContext

void resetParameterContext(java.lang.String qualifier)
Reset the parameter object from the policy context map.

Parameters:
qualifier - a qualifier (key for the used context Map)

getContextObjects

java.util.Collection getContextObjects(java.lang.String qualifier)
                                       throws java.lang.Exception
Gets the objects that are available in the policy context under the specified qualifier. Supported Qualifiers are com.softwareag.centrasite.assetmanagement.api.CollectQualifier.COMPOSITION_COMPONENTS com.softwareag.centrasite.assetmanagement.api.CollectQualifier.AGGREGATION_COMPONENTS com.softwareag.centrasite.assetmanagement.api.CollectQualifier.WEBDAV_COMPOSITION_COMPONENTS com.softwareag.centrasite.assetmanagement.api.CollectQualifier.WEBDAV_AGGREGATION_COMPONENTS

Parameters:
qualifier -
Returns:
Throws:
java.lang.Exception