Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.slide.common
Class NamespaceAccessTokenImpl  view NamespaceAccessTokenImpl download NamespaceAccessTokenImpl.java

java.lang.Object
  extended byorg.apache.slide.common.NamespaceAccessTokenImpl
All Implemented Interfaces:
NamespaceAccessToken, javax.transaction.UserTransaction

public final class NamespaceAccessTokenImpl
extends java.lang.Object
implements NamespaceAccessToken

Namespace access token implementation.

Version:
$Revision: 1.28 $

Field Summary
private static java.lang.String ACL_SEMANTICS
           
private static java.lang.String ALL_GRANT_BEFORE_DENY
           
private  org.apache.slide.content.Content contentHelper
          Content helper functions.
private static java.lang.String LEGACY_ALL_GRANT_BEFORE_DENY
           
private  org.apache.slide.lock.Lock lockHelper
          Lock helper functions.
private  org.apache.slide.macro.Macro macroHelper
          Macro helper functions.
(package private)  Namespace namespace
          Default namespace associated with this token.
private  org.apache.slide.search.Search searchHelper
          Search helper functions.
private  org.apache.slide.security.Security securityHelper
          Security helper functions.
private  org.apache.slide.structure.Structure structureHelper
          Structure helper functions.
 
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.
 org.apache.slide.content.Content getContentHelper()
          Get the content helper.
 org.apache.slide.lock.Lock getLockHelper()
          Get the lock helper.
 org.apache.slide.util.logger.Logger getLogger()
          Get namespace logger.
 org.apache.slide.macro.Macro getMacroHelper()
          Get the macro helper.
 java.lang.String getName()
          Get namespace name.
 NamespaceConfig getNamespaceConfig()
          Retrive the namespace configuration.
 org.apache.slide.search.Search getSearchHelper()
          Get the search helper.
 org.apache.slide.security.Security getSecurityHelper()
          Get the security helper.
 int getStatus()
          Obtain the status of the transaction associated with the current thread.
 org.apache.slide.structure.Structure getStructureHelper()
          Get the structure helper.
 javax.transaction.TransactionManager getTransactionManager()
           
 Uri getUri(SlideToken token, java.lang.String uri)
          Builds a new uri object to access this namespace.
 void importData(SlideToken token, org.apache.slide.util.conf.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACL_SEMANTICS

private static java.lang.String ACL_SEMANTICS

ALL_GRANT_BEFORE_DENY

private static java.lang.String ALL_GRANT_BEFORE_DENY

LEGACY_ALL_GRANT_BEFORE_DENY

private static java.lang.String LEGACY_ALL_GRANT_BEFORE_DENY

namespace

Namespace namespace
Default namespace associated with this token.


structureHelper

private org.apache.slide.structure.Structure structureHelper
Structure helper functions.


contentHelper

private org.apache.slide.content.Content contentHelper
Content helper functions.


lockHelper

private org.apache.slide.lock.Lock lockHelper
Lock helper functions.


searchHelper

private org.apache.slide.search.Search searchHelper
Search helper functions.


securityHelper

private org.apache.slide.security.Security securityHelper
Security helper functions.


macroHelper

private org.apache.slide.macro.Macro macroHelper
Macro helper functions.

Constructor Detail

NamespaceAccessTokenImpl

NamespaceAccessTokenImpl(Namespace namespace)
Constructor.

Method Detail

getStructureHelper

public org.apache.slide.structure.Structure getStructureHelper()
Get the structure helper.

Specified by:
getStructureHelper in interface NamespaceAccessToken

getContentHelper

public org.apache.slide.content.Content getContentHelper()
Get the content helper.

Specified by:
getContentHelper in interface NamespaceAccessToken

getLockHelper

public org.apache.slide.lock.Lock getLockHelper()
Get the lock helper.

Specified by:
getLockHelper in interface NamespaceAccessToken

getSearchHelper

public org.apache.slide.search.Search getSearchHelper()
Get the search helper.

Specified by:
getSearchHelper in interface NamespaceAccessToken

getSecurityHelper

public org.apache.slide.security.Security getSecurityHelper()
Get the security helper.

Specified by:
getSecurityHelper in interface NamespaceAccessToken

getMacroHelper

public org.apache.slide.macro.Macro getMacroHelper()
Get the macro helper.

Specified by:
getMacroHelper in interface NamespaceAccessToken

getNamespaceConfig

public NamespaceConfig getNamespaceConfig()
Retrive the namespace configuration.

Specified by:
getNamespaceConfig in interface NamespaceAccessToken

getLogger

public org.apache.slide.util.logger.Logger getLogger()
Get namespace logger.

Specified by:
getLogger in interface NamespaceAccessToken

importData

public void importData(SlideToken token,
                       org.apache.slide.util.conf.Configuration dataConfiguration)
                throws org.apache.slide.util.conf.ConfigurationException,
                       UnknownObjectClassException,
                       ServiceAccessException
Import data from Avalon configuration object.

Specified by:
importData in interface NamespaceAccessToken

importData

public void importData(SlideToken token,
                       java.io.Reader reader)
                throws org.apache.slide.util.conf.ConfigurationException,
                       UnknownObjectClassException,
                       ServiceAccessException,
                       org.xml.sax.SAXException,
                       java.io.IOException
Import data from reader.

Specified by:
importData in interface NamespaceAccessToken

exportData

public void exportData(SlideToken token,
                       java.io.Writer writer)
                throws SlideException
Saves Slide Data to XML.

Specified by:
exportData in interface NamespaceAccessToken

exportData

public void exportData(SlideToken token,
                       java.io.Writer writer,
                       java.lang.String startNode)
                throws SlideException
Saves Slide Data to XML.

Specified by:
exportData in interface NamespaceAccessToken

disconnect

public void disconnect()
Disconnect.

Specified by:
disconnect in interface NamespaceAccessToken

getName

public java.lang.String getName()
Get namespace name.

Specified by:
getName in interface NamespaceAccessToken

getUri

public Uri getUri(SlideToken token,
                  java.lang.String uri)
Builds a new uri object to access this namespace.

Specified by:
getUri in interface NamespaceAccessToken

begin

public void begin()
           throws javax.transaction.NotSupportedException,
                  javax.transaction.SystemException
Create a new transaction and associate it with the current thread.

Specified by:
begin in interface javax.transaction.UserTransaction

commit

public void commit()
            throws javax.transaction.RollbackException,
                   javax.transaction.HeuristicMixedException,
                   javax.transaction.HeuristicRollbackException,
                   java.lang.SecurityException,
                   java.lang.IllegalStateException,
                   javax.transaction.SystemException
Complete the transaction associated with the current thread. When this method completes, the thread becomes associated with no transaction.

Specified by:
commit in interface javax.transaction.UserTransaction

rollback

public void rollback()
              throws java.lang.SecurityException,
                     java.lang.IllegalStateException,
                     javax.transaction.SystemException
Roll back the transaction associated with the current thread. When this method completes, the thread becomes associated with no transaction.

Specified by:
rollback in interface javax.transaction.UserTransaction

setRollbackOnly

public void setRollbackOnly()
                     throws java.lang.IllegalStateException,
                            javax.transaction.SystemException
Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.

Specified by:
setRollbackOnly in interface javax.transaction.UserTransaction

getStatus

public int getStatus()
              throws javax.transaction.SystemException
Obtain the status of the transaction associated with the current thread.

Specified by:
getStatus in interface javax.transaction.UserTransaction

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws javax.transaction.SystemException
Modify the value of the timeout value that is associated with the transactions started by the current thread with the begin method.

If an application has not called this method, the transaction service uses some default value for the transaction timeout.

Specified by:
setTransactionTimeout in interface javax.transaction.UserTransaction

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Specified by:
getTransactionManager in interface NamespaceAccessToken