org.openliberty.openaz.pep
Class PepResponseFactory

java.lang.Object
  extended by org.openliberty.openaz.pep.PepResponseFactory

public class PepResponseFactory
extends java.lang.Object

Factory for creating and configuring PepResponse.
This class creates PepResponse objects and configures the behavior of how the PepResponse interprets the results from the AzService.
The Behavior can either be to

Author:
Josh Bregman, Rich Levinson, Prateek Mishra

Nested Class Summary
static class PepResponseFactory.Behavior
          An enum containing an enumerated list of behavior options.
 
Constructor Summary
PepResponseFactory()
           
 
Method Summary
 PepResponse createPepResponse(AzResponseContext responseContext, PepRequest pepRequest, org.openliberty.openaz.pep.PepRequest.OPERATION operation)
           
 PepResponse createPepResponse(java.util.Set<AzResourceActionAssociation> actionResourceAssociations, PepRequest pepRequest, boolean queryAllowed)
           
 PepResponseFactory.Behavior getMissingAttributeBehavior()
           
 PepResponseFactory.Behavior getNotApplicableBehavior()
           
 ObligationFactory getObligationFactory()
           
 PepResponseFactory.Behavior getProcessingErrorBehavior()
           
 PepResponseFactory.Behavior getSyntaxErrorBehavior()
           
 void setMissingAttributeBehavior(PepResponseFactory.Behavior missingAttributeBehavior)
          Set the behavior to one of those described in PepResponseFactory.Behavior when an Indeterminate decision with a MissingAttribute status code is returned from the underlying AzApi implementation.
 void setNotApplicableBehavior(PepResponseFactory.Behavior notApplicableBehavior)
          Set the behavior to one of those described in PepResponseFactory.Behavior when a NotApplicable decision is returned from the underlying AzApi implementation.
 void setObligationFactory(ObligationFactory obligationFactory)
           
 void setProcessingErrorBehavior(PepResponseFactory.Behavior processingErrorBehavior)
          Set the behavior to one of those described in PepResponseFactory.Behavior when an Indeterminate decision with a ProcessingError status code is returned from the underlying AzApi implementation.
 void setSyntaxErrorBehavior(PepResponseFactory.Behavior syntaxErrorBehavior)
          Set the behavior to one of those described in PepResponseFactory.Behavior when an Indeterminate decision with a SyntaxError status code is returned from the underlying AzApi implementation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PepResponseFactory

public PepResponseFactory()
Method Detail

createPepResponse

public PepResponse createPepResponse(AzResponseContext responseContext,
                                     PepRequest pepRequest,
                                     org.openliberty.openaz.pep.PepRequest.OPERATION operation)

createPepResponse

public PepResponse createPepResponse(java.util.Set<AzResourceActionAssociation> actionResourceAssociations,
                                     PepRequest pepRequest,
                                     boolean queryAllowed)

setObligationFactory

public void setObligationFactory(ObligationFactory obligationFactory)

getObligationFactory

public ObligationFactory getObligationFactory()

setNotApplicableBehavior

public void setNotApplicableBehavior(PepResponseFactory.Behavior notApplicableBehavior)
Set the behavior to one of those described in PepResponseFactory.Behavior when a NotApplicable decision is returned from the underlying AzApi implementation.

Parameters:
notApplicableBehavior -

getNotApplicableBehavior

public PepResponseFactory.Behavior getNotApplicableBehavior()

setSyntaxErrorBehavior

public void setSyntaxErrorBehavior(PepResponseFactory.Behavior syntaxErrorBehavior)
Set the behavior to one of those described in PepResponseFactory.Behavior when an Indeterminate decision with a SyntaxError status code is returned from the underlying AzApi implementation.

Parameters:
syntaxErrorBehavior -

getSyntaxErrorBehavior

public PepResponseFactory.Behavior getSyntaxErrorBehavior()

setProcessingErrorBehavior

public void setProcessingErrorBehavior(PepResponseFactory.Behavior processingErrorBehavior)
Set the behavior to one of those described in PepResponseFactory.Behavior when an Indeterminate decision with a ProcessingError status code is returned from the underlying AzApi implementation.

Parameters:
processingErrorBehavior -

getProcessingErrorBehavior

public PepResponseFactory.Behavior getProcessingErrorBehavior()

setMissingAttributeBehavior

public void setMissingAttributeBehavior(PepResponseFactory.Behavior missingAttributeBehavior)
Set the behavior to one of those described in PepResponseFactory.Behavior when an Indeterminate decision with a MissingAttribute status code is returned from the underlying AzApi implementation.

Parameters:
missingAttributeBehavior -

getMissingAttributeBehavior

public PepResponseFactory.Behavior getMissingAttributeBehavior()