|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.p13n.content.ContentHelper
Helper class for dealing with Content, ContentManagers, and the possible subclasses.
Field Summary | |
static java.lang.String |
DEF_CONTENT_HOME
Deprecated. Use DEF_CONTENT_MANAGER_HOME instead. |
static java.lang.String |
DEF_CONTENT_MANAGER_HOME
The default ContentManagerHome name. |
static boolean |
DEF_CONTENT_READONLY
Deprecated. No longer needed. |
static java.lang.String |
DEF_CONTENT_SCHEMA_HOME
Deprecated. Use PropertySetManager and ejb-refs instead. |
static java.lang.String |
DEF_DOCUMENT_HOME
Deprecated. Use DEF_DOCUMENT_MANAGER_HOME instead. |
static java.lang.String |
DEF_DOCUMENT_MANAGER_HOME
The default DocumentManagerHome name. |
static java.lang.String |
DEF_DOCUMENT_SCHEMA_HOME
Deprecated. Use PropertySetManager and ejb-refs instead. |
static boolean |
USE_SOFT_HASH_MAP
Deprecated. No longer needed. |
Constructor Summary | |
ContentHelper()
|
Method Summary | |
static Content[] |
getContent(java.lang.String homeName,
Search s)
Return an array of Content from the ContentManager at the given name. |
static Content[] |
getContent(java.lang.String homeName,
Search s)
Deprecated. Use new Search instead |
static Content[] |
getContent(java.lang.String homeName,
Search s,
boolean readOnly)
Deprecated. Use getContent(String, Search) instead. |
static Content[] |
getContent(java.lang.String homeName,
Search s,
boolean readOnly)
Deprecated. Use new content expressions and getContent(String, Search) instead. |
static java.util.Enumeration |
getContentFromManager(java.lang.String homeName,
javax.ejb.EJBHome home,
Search s)
Deprecated. use getContentManager(homeName, home).getContent(s) instead. |
static java.util.Enumeration |
getContentFromManager(java.lang.String homeName,
javax.ejb.EJBHome home,
Search s)
Deprecated. use new content search and getContentManager(homeName, home).getContent(s) instead. |
static java.util.Enumeration |
getContentFromManager(java.lang.String homeName,
javax.ejb.EJBHome home,
Search s,
boolean readOnly)
Deprecated. Use getContentManager(homeName, home).getContent(s); |
static java.util.Enumeration |
getContentFromManager(java.lang.String homeName,
javax.ejb.EJBHome home,
Search s,
boolean readOnly)
Deprecated. Use new content expressions and getContentManager(homeName, home).getContent(s); |
static java.util.Collection |
getContentIds(java.lang.String homeName,
Search s)
Return an rray of Content from the ContentManager or ContentHome at the given name. |
static int |
getContentLength(long docSize,
int bytesLen)
Return the correct content length. |
static ContentManager |
getContentManager(java.lang.String homeName)
Get a ContentManager from a JNDI home name. |
static ContentManager |
getContentManager(java.lang.String homeName,
javax.ejb.EJBHome home)
Get a ContentManager from an EJBHome. |
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. |
static java.lang.String |
toHTML(java.lang.String in)
Convert an arbitrary string to HTML which will display as the original string intended. |
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
public static final java.lang.String DEF_CONTENT_HOME
public static final java.lang.String DEF_CONTENT_MANAGER_HOME
This points to "java:comp/env/ejb/ContentManager", which is the closest <ejb-ref>'ed ContentManager home. The <ejb-ref> should be configured either in your EJB ejb-jar.xml deployment descriptor or in your webapp's web.xml deployment descriptor.
public static final java.lang.String DEF_CONTENT_SCHEMA_HOME
public static final java.lang.String DEF_DOCUMENT_HOME
public static final java.lang.String DEF_DOCUMENT_MANAGER_HOME
This points to "java:comp/env/ejb/DocumentManager", which is the closest <ejb-ref>'ed DocumentManager home. The <ejb-ref> should be configured either in your EJB ejb-jar.xml deployment descriptor or in your webapp's web.xml deployment descriptor.
public static final java.lang.String DEF_DOCUMENT_SCHEMA_HOME
public static boolean USE_SOFT_HASH_MAP
Constructor Detail |
public ContentHelper()
Method Detail |
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. The resulting enumeration will be put into an array.
getContentManager(java.lang.String)
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. The resulting enumeration will be put into an array.
getContentManager(java.lang.String)
,
Search
public static java.util.Collection getContentIds(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 getContentIds() method will be used.
getContentManager(java.lang.String)
public static ContentManager getContentManager(java.lang.String homeName) throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException, java.lang.IllegalArgumentException
homeName
- the original home name.getContentManager(java.lang.String, javax.ejb.EJBHome)
public static ContentManager getContentManager(java.lang.String homeName, javax.ejb.EJBHome home) throws javax.ejb.CreateException, java.rmi.RemoteException, java.lang.IllegalArgumentException
homeName
- the original home name.home
- the EJBHome.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.
getContent(java.lang.String, com.bea.p13n.content.expression.Search)
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.
getContent(java.lang.String, com.bea.p13n.content.expression.Search)
public static java.util.Enumeration getContentFromManager(java.lang.String homeName, javax.ejb.EJBHome home, Search s) 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.getContentManager(java.lang.String, javax.ejb.EJBHome)
public static java.util.Enumeration getContentFromManager(java.lang.String homeName, javax.ejb.EJBHome home, Search s) 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.getContentManager(java.lang.String, javax.ejb.EJBHome)
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 (ignored).getContentManager(java.lang.String, javax.ejb.EJBHome)
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 (ignored).getContentManager(java.lang.String, javax.ejb.EJBHome)
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.com.bea.p13n.content.document.document.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.
public static java.lang.String toHTML(java.lang.String in)
This will replace the characters '&', '"', '<', and '>' with '&', "', '<', and '>', respectively.
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |