BEA Systems, Inc.

com.beasys.commerce.axiom.content
Class ContentManagerImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.SessionImpl
        |
        +--com.beasys.commerce.axiom.content.ContentManagerImpl
Direct Known Subclasses:
DocumentManagerImpl

public class ContentManagerImpl
extends SessionImpl

An implementation of the ContentManager interface.

This obeys the following EJB environment variables:

See Also:
ContentManager, ContentManagerHome, Serialized Form

Field Summary
protected  java.lang.String contentHome
          The JNDI home name of the content object to access.
protected  java.lang.String schemaHome
          The JNDI home name of the schema object to access.
 
Fields inherited from class com.beasys.commerce.foundation.SessionImpl
_ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty
 
Constructor Summary
ContentManagerImpl()
          Constructor.
 
Method Summary
 void ejbActivate()
          Called when the bean is activated.
 void ejbCreate()
          Called when the bean is being created.
 void ejbPassivate()
          Called when the bean is passivated.
 void ejbPostCreate()
          Called after the create finishes.
 void ejbRemove()
          Called when the bean is removed.
 java.util.Enumeration getAllSchemas()
          Return all the content Schema objects this ContentManager knows about.
 java.util.Enumeration getContent(Search params)
          Get an Enumeration of Content object that match the seach parameters.
 java.util.Enumeration getContent(Search params, boolean readOnly)
          Get an Enumeration of Content object that match the seach parameters.
 javax.ejb.EJBHome getContentHome()
          Get the ContentHome to use for getting Content.
 java.lang.String getDefaultContentHomeName()
          Get the default content home name to use.
 java.lang.String getDefaultContentSchemaHomeName()
          Get the default content schema home name to use.
 javax.naming.Context getJNDIContext()
          Deprecated. No longer needed (use getEnvironmentProperty)
 Schema getSchema(java.lang.String scope)
          Get the content schema with the given name.
 javax.ejb.EJBHome getSchemaHome()
          Get the SchemaHome to use for getting Schemas.
 javax.ejb.EJBHome lookupHome(java.lang.String name)
          Helper method to lookup a home.
 void setSessionContext(javax.ejb.SessionContext ctx)
          Called when the bean is about to be used.
 boolean verifyHome(javax.ejb.EJBHome home, java.lang.Class cl)
          Verify that the specified home is the home for the specified EJBObjects.
 
Methods inherited from class com.beasys.commerce.foundation.SessionImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, getEnvironmentNamingContext, getEnvironmentProperty, getEnvironmentProperty, getEnvironmentPropertyCache, getPersistenceHelperPlugin, getSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contentHome

protected transient java.lang.String contentHome
The JNDI home name of the content object to access.

This will null if the ejb/ContentHome environment setting should be used.


schemaHome

protected transient java.lang.String schemaHome
The JNDI home name of the schema object to access.

This will null if the ejb/SchemaHome environment setting should be used.

Constructor Detail

ContentManagerImpl

public ContentManagerImpl()
                   throws javax.ejb.CreateException
Constructor.
Throws:
javax.ejb.CreateException - thrown on an error
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Called when the bean is being created.

This will pull information from the bean's environment.

Overrides:
ejbCreate in class SessionImpl
Throws:
javax.ejb.EJBException - thrown on an error.
javax.ejb.CreateException - thrown on an error.

ejbPostCreate

public void ejbPostCreate()
                   throws javax.ejb.CreateException,
                          javax.ejb.EJBException
Called after the create finishes.

This delagates to the super class.

Overrides:
ejbPostCreate in class SessionImpl
Throws:
javax.ejb.EJBException - thrown on an error.
javax.ejb.CreateException - thrown on an error.

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException
Called when the bean is activated.
Overrides:
ejbActivate in class SessionImpl
Throws:
javax.ejb.EJBException - thrown on an error.

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException
Called when the bean is passivated.
Overrides:
ejbPassivate in class SessionImpl
Throws:
javax.ejb.EJBException - thrown on an error.

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException
Called when the bean is removed.
Overrides:
ejbRemove in class SessionImpl
Throws:
javax.ejb.EJBException - thrown on an error.

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException
Called when the bean is about to be used.
Overrides:
setSessionContext in class SessionImpl
Throws:
javax.ejb.EJBException - thrown on an error.

getContent

public java.util.Enumeration getContent(Search params)
                                 throws java.rmi.RemoteException
Get an Enumeration of Content object that match the seach parameters.

This will always delagate the call to a ContentHome.

Subclasses should override to get different behavior.

Throws:
java.rmi.RemoteException - thrown on an error.
See Also:
getContentHome()

getContent

public java.util.Enumeration getContent(Search params,
                                        boolean readOnly)
                                 throws java.rmi.RemoteException
Get an Enumeration of Content object that match the seach parameters.

This will call getContent(Search). Subclasses should override if they will obey the readOnly flag.

Throws:
java.rmi.RemoteException - thrown on an error.

getSchema

public Schema getSchema(java.lang.String scope)
                 throws java.rmi.RemoteException
Get the content schema with the given name.
Throws:
java.rmi.RemoteException - thrown on an error.
See Also:
getAllSchemas()

getAllSchemas

public java.util.Enumeration getAllSchemas()
                                    throws java.rmi.RemoteException
Return all the content Schema objects this ContentManager knows about.

This will delagate to a SchemaHome object.

Throws:
java.rmi.RemoteException - thrown on an error.
See Also:
getSchemaHome()

getContentHome

public javax.ejb.EJBHome getContentHome()
                                 throws javax.naming.NamingException,
                                        java.rmi.RemoteException
Get the ContentHome to use for getting Content.

If contentHome is null, this will use ejb/ContentHome environment setting. Otherwise, it will use the value of contentHome as the JNDI name of the ContentHome object to use.

Throws:
java.rmi.RemoteException - thrown on a communications error.
javax.naming.NamingException - thrown if either ejb/ContentHome or contentHome cannot be found.

getSchemaHome

public javax.ejb.EJBHome getSchemaHome()
                                throws javax.naming.NamingException,
                                       java.rmi.RemoteException
Get the SchemaHome to use for getting Schemas.

If schemaHome is null, this will use ejb/SchemaHome environment setting. Otherwise, it will use the value of schemaHome as the JNDI name of the SchemaHome object to use.

Throws:
java.rmi.RemoteException - thrown on a communications error.
javax.naming.NamingException - thrown if either ejb/SchemaHome or schemaHome cannot be found.

lookupHome

public javax.ejb.EJBHome lookupHome(java.lang.String name)
                             throws javax.naming.NamingException
Helper method to lookup a home.
Throws:
javax.naming.NamingException - thrown on an error finding the named object.

verifyHome

public boolean verifyHome(javax.ejb.EJBHome home,
                          java.lang.Class cl)
                   throws java.rmi.RemoteException
Verify that the specified home is the home for the specified EJBObjects.
Parameters:
home - the ejb home
cl - the desired EJBObject interface class.
Throws:
java.rmi.RemoteException - thrown if we cannot get the EJB metadata.

getJNDIContext

public javax.naming.Context getJNDIContext()
                                    throws javax.naming.NamingException
Deprecated. No longer needed (use getEnvironmentProperty)

Get the bean Context this should use.

The bean will use this to look up environment values.

.
Throws:
javax.naming.NamingException -  

getDefaultContentHomeName

public java.lang.String getDefaultContentHomeName()
Get the default content home name to use.
See Also:
ContentHelper.DEF_CONTENT_HOME

getDefaultContentSchemaHomeName

public java.lang.String getDefaultContentSchemaHomeName()
Get the default content schema home name to use.
See Also:
ContentHelper.DEF_CONTENT_SCHEMA_HOME

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved