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 BatchRequestDsml
getBatchRequest()
Gets the DSML Batch RequestBatchResponseDsml
getBatchResponse()
Gets the DSML Batch ResponseAbstractGrammar
getGrammar()
Gets the grammarLdapApiService
getLdapCodecService()
Gets theLdapApiService
associated with this Container.org.xmlpull.v1.XmlPullParser
getParser()
Gets the parserEnum<Dsmlv2StatesEnum>
getState()
Get the current grammar stateEnum<Dsmlv2StatesEnum>[]
getStates()
Get the states for this container's grammarsEnum<Dsmlv2StatesEnum>
getTransition()
Get the transitionGrammarTransition
getTransition(Enum<Dsmlv2StatesEnum> currentState, Tag currentTag)
Get the transition associated with the state and tagvoid
setBatchRequest(BatchRequestDsml batchRequest)
Sets the DSML Batch Requestvoid
setBatchResponse(BatchResponseDsml batchResponse)
Sets the DSML Batch Requestvoid
setGrammar(AbstractGrammar grammar)
Sets the Grammarvoid
setParser(org.xmlpull.v1.XmlPullParser parser)
Sets the parservoid
setState(Enum<Dsmlv2StatesEnum> state)
Set the new current statevoid
setTransition(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 theLdapApiService
associated 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 org.xmlpull.v1.XmlPullParser getParser()
Gets the parser- Returns:
- the parser
-
setParser
public void setParser(org.xmlpull.v1.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:
getTransition
in 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:
setTransition
in 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.
-
-