|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.slide.common.NamespaceAccessTokenImpl
Namespace access token implementation.
Field Summary | |
(package private) Namespace |
namespace
Default namespace associated with this token. |
Constructor Summary | |
(package private) |
NamespaceAccessTokenImpl(Namespace namespace)
Constructor. |
Method Summary | |
void |
begin()
Create a new transaction and associate it with the current thread. |
void |
commit()
Complete the transaction associated with the current thread. |
void |
disconnect()
Disconnect. |
void |
exportData(SlideToken token,
java.io.Writer writer)
Saves Slide Data to XML. |
void |
exportData(SlideToken token,
java.io.Writer writer,
java.lang.String startNode)
Saves Slide Data to XML. |
Content |
getContentHelper()
Get the content helper. |
Lock |
getLockHelper()
Get the lock helper. |
Logger |
getLogger()
Get namespace logger. |
Macro |
getMacroHelper()
Get the macro helper. |
java.lang.String |
getName()
Get namespace name. |
NamespaceConfig |
getNamespaceConfig()
Retrive the namespace configuration. |
Security |
getSecurityHelper()
Get the security helper. |
int |
getStatus()
Obtain the status of the transaction associated with the current thread. |
Structure |
getStructureHelper()
Get the structure helper. |
void |
importData(SlideToken token,
Configuration dataConfiguration)
Import data from Avalon configuration object. |
void |
importData(SlideToken token,
java.io.Reader reader)
Import data from reader. |
void |
rollback()
Roll back the transaction associated with the current thread. |
void |
setRollbackOnly()
Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction. |
void |
setTransactionTimeout(int seconds)
Modify the value of the timeout value that is associated with the transactions started by the current thread with the begin method. |
Methods inherited from class java.lang.Object |
|
Field Detail |
Namespace namespace
Constructor Detail |
NamespaceAccessTokenImpl(Namespace namespace)
namespace
- Namespace which can be accessed through this tokenMethod Detail |
public Structure getStructureHelper()
getStructureHelper
in interface NamespaceAccessToken
public Content getContentHelper()
getContentHelper
in interface NamespaceAccessToken
public Lock getLockHelper()
getLockHelper
in interface NamespaceAccessToken
public Security getSecurityHelper()
getSecurityHelper
in interface NamespaceAccessToken
public Macro getMacroHelper()
getMacroHelper
in interface NamespaceAccessToken
public NamespaceConfig getNamespaceConfig()
getNamespaceConfig
in interface NamespaceAccessToken
public Logger getLogger()
getLogger
in interface NamespaceAccessToken
public void importData(SlideToken token, Configuration dataConfiguration) throws ConfigurationException, UnknownObjectClassException, ServiceAccessException
importData
in interface NamespaceAccessToken
token
- SlideToken, used for access to the namespacedataConfiguration
- Configuration objectConfigurationException
- Something went wrong during the
reading of the XMLUnknownObjectClassException
- Object class not foundServiceAccessException
- Error accessing servicepublic void importData(SlideToken token, java.io.Reader reader) throws ConfigurationException, UnknownObjectClassException, ServiceAccessException, org.xml.sax.SAXException, java.io.IOException
importData
in interface NamespaceAccessToken
token
- SlideToken, used for access to the namespacereader
- ReaderConfigurationException
- Something went wrong during the
reading of the XMLUnknownObjectClassException
- Object class not foundServiceAccessException
- Error accessing servicepublic void exportData(SlideToken token, java.io.Writer writer) throws SlideException
exportData
in interface NamespaceAccessToken
writer
- WriterSlideException
- public void exportData(SlideToken token, java.io.Writer writer, java.lang.String startNode) throws SlideException
exportData
in interface NamespaceAccessToken
writer
- WriterstartNode
- Start generating XML from this node of the Slide treeSlideException
- public void disconnect()
disconnect
in interface NamespaceAccessToken
public java.lang.String getName()
getName
in interface NamespaceAccessToken
public void begin() throws javax.transaction.NotSupportedException, javax.transaction.SystemException
begin
in interface javax.transaction.UserTransaction
javax.transaction.NotSupportedException
- Thrown if the thread is already
associated with a transaction and the Transaction Manager
implementation does not support nested transactions.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void commit() throws javax.transaction.RollbackException, javax.transaction.HeuristicMixedException, javax.transaction.HeuristicRollbackException, java.lang.SecurityException, java.lang.IllegalStateException, javax.transaction.SystemException
commit
in interface javax.transaction.UserTransaction
javax.transaction.RollbackException
- Thrown to indicate that the transaction
has been rolled back rather than committed.javax.transaction.HeuristicMixedException
- Thrown to indicate that a heuristic
decision was made and that some relevant updates have been committed
while others have been rolled back.javax.transaction.HeuristicRollbackException
- Thrown to indicate that a
heuristic decision was made and that some relevant updates have been
rolled back.java.lang.SecurityException
- Thrown to indicate that the thread is not
allowed to commit the transaction.java.lang.IllegalStateException
- Thrown if the current thread is not
associated with a transaction.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void rollback() throws java.lang.SecurityException, java.lang.IllegalStateException, javax.transaction.SystemException
rollback
in interface javax.transaction.UserTransaction
java.lang.SecurityException
- Thrown to indicate that the thread is not
allowed to commit the transaction.java.lang.IllegalStateException
- Thrown if the current thread is not
associated with a transaction.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void setRollbackOnly() throws java.lang.IllegalStateException, javax.transaction.SystemException
setRollbackOnly
in interface javax.transaction.UserTransaction
java.lang.IllegalStateException
- Thrown if the current thread is not
associated with a transaction.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public int getStatus() throws javax.transaction.SystemException
getStatus
in interface javax.transaction.UserTransaction
javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void setTransactionTimeout(int seconds) throws javax.transaction.SystemException
If an application has not called this method, the transaction service uses some default value for the transaction timeout.
setTransactionTimeout
in interface javax.transaction.UserTransaction
seconds
- The value of the timeout in seconds. If the value is
zero, the transaction service restores the default value.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |