kaos.core.csi.usecase.legacy
Class LegacySystemEnforcerImpl

java.lang.Object
  extended by kaos.core.csi.extension.KAoSExtensionComponentImpl
      extended by kaos.core.csi.policy.enforcement.EnforcerImpl
          extended by kaos.core.csi.usecase.legacy.LegacySystemEnforcerImpl
All Implemented Interfaces:
KAoSExtensionComponent, Enforcer, LegacySystem

public class LegacySystemEnforcerImpl
extends EnforcerImpl
implements LegacySystem

This class illustrates how a KAoS Enforcer can enforce selected actions in a legacy system. When a given action has to be executed according to the policies, the Enforcer asks KAoS policy service for action authorization and, if permitted, delegates action execution to the legacy system. Not all actions are constrained by policies. Some actions by design are just delegated for execution to the legacy system without being authorized.

Author:
KAoS Team

Field Summary
 
Fields inherited from class kaos.core.csi.policy.enforcement.EnforcerImpl
_logger, _policyChecking
 
Fields inherited from class kaos.core.csi.extension.KAoSExtensionComponentImpl
_associatedOntTypes, _componentName
 
Constructor Summary
LegacySystemEnforcerImpl(java.lang.String name, java.lang.String ontType)
           
LegacySystemEnforcerImpl(java.lang.String name, java.util.Vector ontTypes)
           
 
Method Summary
 boolean anotherLegacyAction(java.lang.String actionRequestorID)
          Accepts a request for another action in the legacy system.
 boolean legacyAction(java.lang.String actionRequestorID)
          Accepts a request for a legacy action in the legacy system.
static void main(java.lang.String[] args)
           
 void setControlledLegacySystem(LegacySystem legacySystem)
          kaos.core.csi.usecase.legacy.LegacySystem interface implementation - end
 
Methods inherited from class kaos.core.csi.extension.KAoSExtensionComponentImpl
addOntologicalAttribute, getEnabledStatus, getName, getOntologicalAttributes, setEnabledStatus, setName, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface kaos.core.csi.extension.KAoSExtensionComponent
addOntologicalAttribute, getEnabledStatus, getName, getOntologicalAttributes, setEnabledStatus, setName, setProperties
 

Constructor Detail

LegacySystemEnforcerImpl

public LegacySystemEnforcerImpl(java.lang.String name,
                                java.util.Vector ontTypes)
Parameters:
name - String containing the Enforcer name.
ontTypes - Vector containing the ontological names of actions this Enforcer is assocdiated with.

LegacySystemEnforcerImpl

public LegacySystemEnforcerImpl(java.lang.String name,
                                java.lang.String ontType)
Parameters:
name - String containing the Enforcer name.
ontType - Vector containing the ontological names of actions this Enforcer is assocdiated with.
Method Detail

anotherLegacyAction

public boolean anotherLegacyAction(java.lang.String actionRequestorID)
Accepts a request for another action in the legacy system.

Specified by:
anotherLegacyAction in interface LegacySystem
Parameters:
actionRequestorID - String containing the unique ID of the action requestor.
Returns:
boolean indicating success/failure of the action execution.

legacyAction

public boolean legacyAction(java.lang.String actionRequestorID)
Accepts a request for a legacy action in the legacy system. Perform requested legacy action. Before the action execution, check if the action is allowed according to the current set of policies. Note that the action is composed from the business perspective: the actor of the action is the user requesting the action, vs. the software executing the action.

Specified by:
legacyAction in interface LegacySystem
Parameters:
actionRequestorID - String containing the unique ID of the action requestor.
Returns:
boolean indicating success/failure of the action execution.

setControlledLegacySystem

public void setControlledLegacySystem(LegacySystem legacySystem)
kaos.core.csi.usecase.legacy.LegacySystem interface implementation - end


main

public static void main(java.lang.String[] args)
Parameters:
args -