Package org.apache.directory.api.dsmlv2
Class Dsmlv2Container
- java.lang.Object
-
- org.apache.directory.api.dsmlv2.Dsmlv2Container
-
- All Implemented Interfaces:
Container
public class Dsmlv2Container extends Object implements Container
This class represents the DSML Container. It used by the DSML Parser to store information.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description Dsmlv2Container(LdapApiService codec)Creates a new LdapMessageContainer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchRequestDsmlgetBatchRequest()Gets the DSML Batch RequestBatchResponseDsmlgetBatchResponse()Gets the DSML Batch ResponseAbstractGrammargetGrammar()Gets the grammarLdapApiServicegetLdapCodecService()Gets theLdapApiServiceassociated with this Container.XmlPullParsergetParser()Gets the parserEnum<Dsmlv2StatesEnum>getState()Get the current grammar stateEnum<Dsmlv2StatesEnum>[]getStates()Get the states for this container's grammarsEnum<Dsmlv2StatesEnum>getTransition()Get the transitionGrammarTransitiongetTransition(Enum<Dsmlv2StatesEnum> currentState, Tag currentTag)Get the transition associated with the state and tagvoidsetBatchRequest(BatchRequestDsml batchRequest)Sets the DSML Batch RequestvoidsetBatchResponse(BatchResponseDsml batchResponse)Sets the DSML Batch RequestvoidsetGrammar(AbstractGrammar grammar)Sets the GrammarvoidsetParser(XmlPullParser parser)Sets the parservoidsetState(Enum<Dsmlv2StatesEnum> state)Set the new current statevoidsetTransition(Enum<Dsmlv2StatesEnum> transition)Update the transition from a state to another
-
-
-
Constructor Detail
-
Dsmlv2Container
public Dsmlv2Container(LdapApiService codec)
Creates a new LdapMessageContainer object.- Parameters:
codec- the Codec used to encode/decode the messages
-
-
Method Detail
-
getLdapCodecService
public LdapApiService getLdapCodecService()
Gets theLdapApiServiceassociated with this Container.- Returns:
- The codec used to encode/decode the messages
-
getBatchRequest
public BatchRequestDsml getBatchRequest()
Gets the DSML Batch Request- Returns:
- Returns the Batch Request
-
setBatchRequest
public void setBatchRequest(BatchRequestDsml batchRequest)
Sets the DSML Batch Request- Parameters:
batchRequest- the Batch Request to set
-
getBatchResponse
public BatchResponseDsml getBatchResponse()
Gets the DSML Batch Response- Returns:
- Returns the Batch Response
-
setBatchResponse
public void setBatchResponse(BatchResponseDsml batchResponse)
Sets the DSML Batch Request- Parameters:
batchResponse- the Batch Response to set
-
getParser
public XmlPullParser getParser()
Gets the parser- Returns:
- the parser
-
setParser
public void setParser(XmlPullParser parser)
Sets the parser- Parameters:
parser- the parser to set
-
getState
public Enum<Dsmlv2StatesEnum> getState()
Get the current grammar state
-
setState
public void setState(Enum<Dsmlv2StatesEnum> state)
Set the new current state
-
getTransition
public Enum<Dsmlv2StatesEnum> getTransition()
Get the transition- Specified by:
getTransitionin interfaceContainer- Returns:
- the transition from the previous state to the new state
-
setTransition
public void setTransition(Enum<Dsmlv2StatesEnum> transition)
Update the transition from a state to another- Specified by:
setTransitionin interfaceContainer- Parameters:
transition- the transition to set
-
getStates
public Enum<Dsmlv2StatesEnum>[] getStates()
Get the states for this container's grammars
-
getGrammar
public AbstractGrammar getGrammar()
Gets the grammar- Returns:
- the grammar
-
setGrammar
public void setGrammar(AbstractGrammar grammar)
Sets the Grammar- Parameters:
grammar- the grammar to set
-
getTransition
public GrammarTransition getTransition(Enum<Dsmlv2StatesEnum> currentState, Tag currentTag)
Get the transition associated with the state and tag- Parameters:
currentState- the current statecurrentTag- the current tag- Returns:
- a valid transition if any, or null.
-
-