org.apache.directory.api.dsmlv2
Class Dsmlv2Container

java.lang.Object
  extended by 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
Dsmlv2Container(LdapApiService codec)
          Creates a new LdapMessageContainer object.
 
Method Summary
 BatchRequestDsml getBatchRequest()
          Gets the DSML Batch Request
 BatchResponseDsml getBatchResponse()
          Gets the DSML Batch Response
 AbstractGrammar getGrammar()
          Gets the grammar
 LdapApiService getLdapCodecService()
          Gets the LdapApiService associated with this Asn1Container.
 org.xmlpull.v1.XmlPullParser getParser()
          Gets the parser
 Enum<Dsmlv2StatesEnum> getState()
          Get the current grammar state
 Enum<Dsmlv2StatesEnum>[] getStates()
          Get the states for this container's grammars
 Enum<Dsmlv2StatesEnum> getTransition()
          Get the transition
 GrammarTransition getTransition(Enum<Dsmlv2StatesEnum> currentState, Tag currentTag)
          Get the transition associated with the state and tag
 void setBatchRequest(BatchRequestDsml batchRequest)
          Sets the DSML Batch Request
 void setBatchResponse(BatchResponseDsml batchResponse)
          Sets the DSML Batch Request
 void setGrammar(AbstractGrammar grammar)
          Sets the Grammar
 void setParser(org.xmlpull.v1.XmlPullParser parser)
          Sets the parser
 void setState(Enum<Dsmlv2StatesEnum> state)
          Set the new current state
 void setTransition(Enum<Dsmlv2StatesEnum> transition)
          Update the transition from a state to another
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 the LdapApiService associated with this Asn1Container.

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

Specified by:
getState in interface Container
Returns:
the current grammar state

setState

public void setState(Enum<Dsmlv2StatesEnum> state)
Set the new current state

Specified by:
setState in interface Container
Parameters:
state - the new state

getTransition

public Enum<Dsmlv2StatesEnum> getTransition()
Get the transition

Specified by:
getTransition in interface Container
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 interface Container
Parameters:
transition - the transition to set

getStates

public Enum<Dsmlv2StatesEnum>[] getStates()
Get the states for this container's grammars

Specified by:
getStates in interface Container
Returns:
the states.

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 state
currentTag - the current tag
Returns:
a valid transition if any, or null.


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.