|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.content.ContentHelper
Helper class for dealing with Content, ContentHomes, ContentManagers, and the possible subclasses.
Field Summary | |
static java.lang.String |
DEF_CONTENT_HOME
The default ContentHome name. |
static java.lang.String |
DEF_CONTENT_MANAGER_HOME
The default ContentManagerHome name. |
static boolean |
DEF_CONTENT_READONLY
The default readonly flag for getting Content. |
static java.lang.String |
DEF_CONTENT_SCHEMA_HOME
The default Content SchemaHome name. |
static java.lang.String |
DEF_DOCUMENT_HOME
The default DocumentHome name. |
static java.lang.String |
DEF_DOCUMENT_MANAGER_HOME
The default DocumentManagerHome name. |
static java.lang.String |
DEF_DOCUMENT_SCHEMA_HOME
The default Document SchemaHome name. |
static boolean |
USE_SOFT_HASH_MAP
Should caches use a SoftHashMap or not. |
Constructor Summary | |
ContentHelper()
|
Method Summary | |
static Content[] |
getContent(java.lang.String homeName,
Search s)
Return an array of Content from the ContentManager or ContentHome at the given name. |
static Content[] |
getContent(java.lang.String homeName,
Search s,
boolean readOnly)
Return an array of Content from the ContentManager or ContentHome at the given name. |
static java.util.Enumeration |
getContentFromHome(java.lang.String homeName,
javax.ejb.EJBHome home,
Search s)
Search for content from a ContentHome. |
static java.util.Enumeration |
getContentFromManager(java.lang.String homeName,
javax.ejb.EJBHome home,
Search s,
boolean readOnly)
Search for content from a ContentManager. |
static int |
getContentLength(long docSize,
int bytesLen)
Return the correct content length. |
static java.lang.String |
pathInfoEncode(java.lang.String pathInfo)
Correctly URLEncode a path-info string. |
static Content[] |
toArray(java.util.Enumeration e)
Turn an Enumeration of Content into an array. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final boolean DEF_CONTENT_READONLY
This will be initialized form the "commerce.content.defaultReadOnly" property in the weblogiccommerce.properties. It defaults to true.
public static final java.lang.String DEF_CONTENT_HOME
This will be initialized from the "commerce.home.content.ContentHome" property in the weblogiccommerce.properties file. It defaults to "com.beasys.commerce.axiom.content.Content".
public static final java.lang.String DEF_CONTENT_MANAGER_HOME
This will be initialized from the "commerce.home.content.ContentManagerHome" property in the weblogiccommerce.properties file. It defaults to "com.beasys.commerce.axiom.content.ContentManager".
public static final java.lang.String DEF_CONTENT_SCHEMA_HOME
This will be initialized from the "commerce.home.content.ContentSchemaHome" property in the weblogiccommerce.properties file. It defaults to "com.beasys.commerce.axiom.content.ContentSchema".
public static final java.lang.String DEF_DOCUMENT_HOME
This will be initialized from the "commerce.home.document.DocumentHome" property in the weblogiccommerce.properties file. It defaults to "com.beasys.commerce.axiom.document.Document".
public static final java.lang.String DEF_DOCUMENT_MANAGER_HOME
This will be initialized from the "commerce.home.document.DocumentManagerHome" property in the weblogiccommerce.properties file. It defaults to "com.beasys.commerce.axiom.document.DocumentManager".
public static final java.lang.String DEF_DOCUMENT_SCHEMA_HOME
This will be initialized from the "commerce.home.document.DocumentSchemaHome" property in the weblogiccommerce.properties file. It defaults to "com.beasys.commerce.axiom.document.DocumentSchema".
public static boolean USE_SOFT_HASH_MAP
This will be initizlied from the "commerce.content.cache.useSoftHashMap" property in the weblogiccommerce.properties file. It defaults to false.
Constructor Detail |
public ContentHelper()
Method Detail |
public static Content[] getContent(java.lang.String homeName, Search s, boolean readOnly) throws javax.naming.NamingException, java.rmi.RemoteException, javax.ejb.FinderException, java.lang.IllegalArgumentException
If homeName points to a home for a ContentManager (or subclass), then the home's create() method will be invoked and the ContentManager's getContent() method will be used. If homeName points to a home for Content (or subclasses), then it's findBySearchParams() method will used. The resulting enumeration will be put into an array.
getContentFromManager(java.lang.String, javax.ejb.EJBHome, com.beasys.commerce.foundation.expression.Search, boolean)
,
getContentFromHome(java.lang.String, javax.ejb.EJBHome, com.beasys.commerce.foundation.expression.Search)
public static Content[] getContent(java.lang.String homeName, Search s) throws javax.naming.NamingException, java.rmi.RemoteException, javax.ejb.FinderException, java.lang.IllegalArgumentException
If homeName points to a home for a ContentManager (or subclass), then the home's create() method will be invoked and the ContentManager's getContent() method will be used. If homeName points to a home for Content (or subclasses), then it's findBySearchParams() method will used. The resulting enumeration will be put into an array.
DEF_CONTENT_READONLY
public static java.util.Enumeration getContentFromManager(java.lang.String homeName, javax.ejb.EJBHome home, Search s, boolean readOnly) throws java.rmi.RemoteException, java.lang.IllegalArgumentException
homeName
- the JNDI home name (used for errors).home
- the EJBHome of the ContentManager.s
- the search parameters.readOnly
- the read-only flag.public static java.util.Enumeration getContentFromHome(java.lang.String homeName, javax.ejb.EJBHome home, Search s) throws java.rmi.RemoteException, javax.ejb.FinderException, java.lang.IllegalArgumentException
homeName
- the JNDI home name (used for errors).home
- the EJBHome of the Content.s
- the search parameters.public static Content[] toArray(java.util.Enumeration e)
e
- the Enumeration.public static int getContentLength(long docSize, int bytesLen)
docSize
- the value doc.getSize().bytesLen
- the length of the doc.getContent() array.Document.getContent()
public static java.lang.String pathInfoEncode(java.lang.String pathInfo)
This can be used to pass a contentId as Path-Info to the ShowDocServlet.
This will url encode the pathInfo, but will leave "/"'s alone.
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |