| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.service.actor.ActorChainService
@Service(requiredProperties="definitionFile") public class ActorChainService
The ActorChainService reads actors from an xml definition file. The file defines one or more actor chains. This service passes control to the actor chain to execute the chain's actors. Actor nucleus components will use the this class to define an actor component.
 If you want to use custom getActorContextFactory() and getModelMapFactory() instead
 of the OTB factories, you can configure them in this component. These factories are used use the
 nest chains as well.
 
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| static java.lang.String | ERROR_ACTOR_CONTEXT_OR_MODEL_MAP_NULL | 
| static java.lang.String | ERROR_ACTOR_NAME_NULL | 
| static java.lang.String | ERROR_ACTOR_OR_MESSAGE | 
| static java.lang.String | ERROR_ACTOR_VALUE_NULL | 
| static java.lang.String | ERROR_EXPECTED_MAP_VALUE | 
| static java.lang.String | ERROR_REQUEST_NULL | 
| protected  ActorContextFactory | mActorContextFactory | 
| protected  atg.xml.XMLFile | mDefinitionFile | 
| protected  java.lang.String | mJAXBContextPath | 
| protected  ModelMapFactory | mModelMapFactory | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
| SERVICE_INFO_KEY | 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
|---|
| DEFAULT_LOG_TRACE_STATUS | 
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging | 
|---|
| DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS | 
| Constructor Summary | |
|---|---|
| ActorChainService() | |
| Method Summary | |
|---|---|
|  void | act(ActorContext pActorContext,
    ModelMap pModelMap)This method takes a non-null ActorContext and a non-null ModelMap. | 
| protected  javax.servlet.Servlet | createAdminServlet()Create the administration servlet. | 
| protected  atg.service.actor.ObjectFactory | createObjectFactoryInstance()This method creates an actor framework ObjectFactoryinstance. | 
|  void | doStartService()This method is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. | 
|  java.util.List<atg.service.actor.ActorChain> | getActorChains() | 
|  atg.service.actor.ActorChainValidationService | getActorChainValidationService() | 
|  ActorContextFactory | getActorContextFactory()Returns the actorContextFactory | 
|  java.lang.String | getDefaultActorChainId()This method calls ActorTemplate.computeDefaultActorChainId()to get the 
 default chain id for this actor chain service. | 
|  atg.xml.XMLFile | getDefinitionFile()Returns the definitionFile | 
| protected  java.lang.String | getJAXBContextPath()Returns the jAXBContextPath | 
|  ModelMapFactory | getModelMapFactory()Returns the modelMapFactory | 
| protected  java.util.List<Actor> | getSortedActors(ActorContext pActorContext,
                java.util.List<Actor> pUnsortedActors)This method takes unsorted actors and sorts them based on the follows and followsIfPresent xml definitions of an actor definition. | 
| protected  void | initializeActorTemplate()This method calls unmarshal(XMLFile)to un-marshal the xml file and initializesactorTemplateproperty. | 
|  boolean | isEnableValidateComponentExists()Should validation check if the chains in this component that contain component actors reference components that exist? | 
|  boolean | isEnableValidateComponentInputs()Should validation check if the chains in this actor that contain component have valid inputs | 
|  boolean | isEnableValidateComponentMethod()Should validation check if the chains in this actor that contain components with methods have a valid method | 
|  boolean | isEnableValidateDefaultChainId()Should validation check for a valid default chain id | 
|  boolean | isEnableValidateDropletExists()Should validation check if the chains in this actor that contain droplet actors reference droplet that exist? | 
|  boolean | isEnableValidateDropletInputsUseTernaryOperator()Should validation check if the droplet inputs use ternary operator? | 
|  boolean | isEnableValidateFormInputs()Should validation check if the chains in this actor that contain form actors reference inputs that exist? | 
|  boolean | isEnableValidateFoward()Should validation check if the chains in this actor that contain form actors have a success or error URL that is handling forward/redirect incorrectly? | 
|  boolean | isEnableValidateHandleMethodExists()Should validation check that handle method exists | 
|  boolean | isEnableValidateInputsExist()Should validation check that inputs exist | 
|  boolean | isEnableValidateNestedActorExists()Should validation check if the chains in this actor that contain nested actors reference actors that exist? | 
|  boolean | isEnableValidateRegistration()Should validation check if the chains in this component are registered for REST access? Validation logs an info if not registered. | 
|  boolean | isEnableValidateSuccessErrorUrlExist()Should validation check if the chains in this actor that contain form actors have a success and error URL? | 
|  void | reinitializeActorTemplate()If the getDefinitionFile()has been modified, then this method callsinitializeActorTemplate()to initialize the actor template | 
|  void | setActorChainValidationService(atg.service.actor.ActorChainValidationService pActorChainValidationService) | 
|  void | setActorContextFactory(ActorContextFactory pActorContextFactory)Sets the actorContextFactory | 
| protected  void | setActorTemplate(atg.service.actor.ActorTemplate pActorTemplate)Sets the actorTemplate | 
|  void | setDefinitionFile(atg.xml.XMLFile pDefinitionFile)Sets the definitionFile | 
|  void | setEnableValidateComponentExists(boolean pEnableValidateComponentExists)Should validation check if the chains in this component that contain component actors reference components that exist? | 
|  void | setEnableValidateComponentInputs(boolean pEnableValidateComponentInputs)Should validation check if the chains in this actor that contain component have valid inputs | 
|  void | setEnableValidateComponentMethod(boolean pEnableValidateComponentMethod)Should validation check if the chains in this actor that contain components with methods have a valid method | 
|  void | setEnableValidateDefaultChainId(boolean pEnableValidateDefaultChainId)Should validation check for a valid default chain id | 
|  void | setEnableValidateDropletExists(boolean pEnableValidateDropletExists)Should validation check if the chains in this actor that contain droplet actors reference droplet that exist? | 
|  void | setEnableValidateDropletInputsUseTernaryOperator(boolean pEnableValidateDropletInputsUseTernaryOperator)Should validation check if the droplet inputs use ternary operator? | 
|  void | setEnableValidateFormInputs(boolean pEnableValidateFormInputs)Should validation check if the chains in this actor that contain form actors reference inputs that exist? | 
|  void | setEnableValidateFoward(boolean pEnableValidateFoward)Should validation check if the chains in this actor that contain form actors have a success or error URL that is handling forward/redirect incorrectly? | 
|  void | setEnableValidateHandleMethodExists(boolean pEnableValidateHandleMethodExists)Should validation check for that handle method exists | 
|  void | setEnableValidateInputsExist(boolean pEnableValidateInputsExist)Should validation check for that inputs exist | 
|  void | setEnableValidateNestedActorExists(boolean pEnableValidateNestedActorExists)Should validation check if the chains in this actor that contain nested actors reference actors that exist? | 
|  void | setEnableValidateRegistration(boolean pEnableValidateRegistration)Should validation check if the chains in this component are registered for REST access? Validation logs an info if not registered. | 
|  void | setEnableValidateSuccessErrorUrlExist(boolean pEnableValidateSuccessErrorUrlExist)Should validation check if the chains in this actor that contain form actors have a success and error URL? | 
| protected  void | setJAXBContextPath(java.lang.String pJAXBContextPath)Sets the jAXBContextPath | 
|  void | setModelMapFactory(ModelMapFactory pModelMapFactory)Sets the modelMapFactory | 
| protected  atg.service.actor.ActorTemplate | unmarshal(atg.xml.XMLFile pXMLFile)This method un-marshals actor xml definitions into actorTemplateproperty. | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String ERROR_ACTOR_CONTEXT_OR_MODEL_MAP_NULL
public static final java.lang.String ERROR_REQUEST_NULL
public static final java.lang.String ERROR_ACTOR_NAME_NULL
public static final java.lang.String ERROR_ACTOR_VALUE_NULL
public static final java.lang.String ERROR_ACTOR_OR_MESSAGE
public static final java.lang.String ERROR_EXPECTED_MAP_VALUE
protected ActorContextFactory mActorContextFactory
protected ModelMapFactory mModelMapFactory
protected atg.xml.XMLFile mDefinitionFile
protected java.lang.String mJAXBContextPath
| Constructor Detail | 
|---|
public ActorChainService()
| Method Detail | 
|---|
public ActorContextFactory getActorContextFactory()
public void setActorContextFactory(ActorContextFactory pActorContextFactory)
pActorContextFactory - the actorContextFactory to setpublic ModelMapFactory getModelMapFactory()
public void setModelMapFactory(ModelMapFactory pModelMapFactory)
pModelMapFactory - the modelMapFactory to setprotected void setActorTemplate(atg.service.actor.ActorTemplate pActorTemplate)
pActorTemplate - the actorTemplate to setpublic atg.xml.XMLFile getDefinitionFile()
public void setDefinitionFile(atg.xml.XMLFile pDefinitionFile)
pDefinitionFile - the definitionFile to setprotected java.lang.String getJAXBContextPath()
This value is used to set the JAXB Context.
protected void setJAXBContextPath(java.lang.String pJAXBContextPath)
This value is used to set the JAXB Context.
pJAXBContextPath - the jAXBContextPath to setpublic atg.service.actor.ActorChainValidationService getActorChainValidationService()
ActorChainValidationServicepublic void setActorChainValidationService(atg.service.actor.ActorChainValidationService pActorChainValidationService)
ActorChainValidationServicepublic java.util.List<atg.service.actor.ActorChain> getActorChains()
public boolean isEnableValidateDefaultChainId()
public void setEnableValidateDefaultChainId(boolean pEnableValidateDefaultChainId)
public boolean isEnableValidateInputsExist()
public void setEnableValidateInputsExist(boolean pEnableValidateInputsExist)
public boolean isEnableValidateHandleMethodExists()
public void setEnableValidateHandleMethodExists(boolean pEnableValidateHandleMethodExists)
public boolean isEnableValidateRegistration()
public void setEnableValidateRegistration(boolean pEnableValidateRegistration)
public boolean isEnableValidateComponentExists()
public void setEnableValidateComponentExists(boolean pEnableValidateComponentExists)
public boolean isEnableValidateFormInputs()
public void setEnableValidateFormInputs(boolean pEnableValidateFormInputs)
public boolean isEnableValidateDropletExists()
public void setEnableValidateDropletExists(boolean pEnableValidateDropletExists)
public boolean isEnableValidateSuccessErrorUrlExist()
public void setEnableValidateSuccessErrorUrlExist(boolean pEnableValidateSuccessErrorUrlExist)
public boolean isEnableValidateFoward()
public void setEnableValidateFoward(boolean pEnableValidateFoward)
public boolean isEnableValidateDropletInputsUseTernaryOperator()
public void setEnableValidateDropletInputsUseTernaryOperator(boolean pEnableValidateDropletInputsUseTernaryOperator)
public boolean isEnableValidateComponentInputs()
public void setEnableValidateComponentInputs(boolean pEnableValidateComponentInputs)
public boolean isEnableValidateComponentMethod()
public void setEnableValidateComponentMethod(boolean pEnableValidateComponentMethod)
public boolean isEnableValidateNestedActorExists()
public void setEnableValidateNestedActorExists(boolean pEnableValidateNestedActorExists)
public void doStartService()
                    throws ServiceException
 This method calls initializeActorTemplate() to initialize actor template data.
doStartService in class GenericServiceServiceException - if the Service had a problem starting upinitializes actor templateprotected javax.servlet.Servlet createAdminServlet()
createAdminServlet in class GenericService
public void act(ActorContext pActorContext,
                ModelMap pModelMap)
         throws ActorException
Configuration.isReinitializeActorTempleOnFileModification(). If it is configured to  
 re-initialize, then this method calls reinitializeActorTemplate() to 
 reinitialize actor template.
 ActorUtils.__ATG_ACTOR_CHAIN_SERVICE__
  b) ActorUtils.__ATG_ACTOR_CONTEXT_FACTORY__
  c) ActorUtils.__ATG_MODEL_MAP_FACTORY__
  d) ActorUtils#__ATG_ACTOR_MODEL_MAP__
 ActorTemplate.determineActorChain(ActorContext) to get the
 chain that needs to be executed and calls ActorChain.act(ActorContext, ModelMap) to execute the chain.
 
act in interface ActorpActorContext - The ActorContext is a map where attributes can be passed into the actor.pModelMap - A map that contains models
ActorException - If there is any error, this exception is thrown.Configuration#isReinitializeActorTempleOnFileModification()}, 
reinitializeActorTemplate(), 
ActorUtils.putActorChainService(ActorContext, ActorChainService), 
ActorUtils.putActorContextFactory(ActorContext, ActorContextFactory), 
ActorUtils.putActorModelMapFactory(ActorContext, ModelMapFactory), 
ActorTemplate.determineActorChain(ActorContext), 
ActorChain.act(ActorContext, ModelMap)
protected atg.service.actor.ObjectFactory createObjectFactoryInstance()
                                                               throws ActorException
ObjectFactory instance.
 If you extend any actor JAXB Beans, then you need to extend this method.
ActorException
protected atg.service.actor.ActorTemplate unmarshal(atg.xml.XMLFile pXMLFile)
                                             throws ActorException
actorTemplate property.
 
 The JAXB context is set using the getJAXBContextPath(). The ObjectFactory
 instance is created using createObjectFactoryInstance(). After setting up the required JAXB settings
 the getDefinitionFile() XML file is un-marshaled.
 
ActorExceptiongetJAXBContextPath(), 
createObjectFactoryInstance()
public java.lang.String getDefaultActorChainId()
                                        throws ActorException
ActorTemplate.computeDefaultActorChainId() to get the 
 default chain id for this actor chain service.
 
getDefaultActorChainId in interface VariantActorActorExceptionActorTemplate.computeDefaultActorChainId()
public void reinitializeActorTemplate()
                               throws ActorException
getDefinitionFile() has been modified, then this method calls initializeActorTemplate() 
 to initialize the actor template
 
ActorExceptionIf the XML file is modified, then the actorTemplate property is reinitialized., 
Initializes the actorTemplate property.
protected void initializeActorTemplate()
                                throws ActorException
unmarshal(XMLFile) to un-marshal the xml file and initializes 
 actorTemplate property.
 
ActorException#unmarshal(XMLFile)}
protected java.util.List<Actor> getSortedActors(ActorContext pActorContext,
                                                java.util.List<Actor> pUnsortedActors)
                                         throws ActorException
pActorContext - pUnsortedActors - 
ActorExceptionBaseAbstractActor#addSortedActors(ActorContext, List, List)} Adds the follows, followsIfPresent actors| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||