|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.p13n.content.ContentHelper
Helper class for dealing with Content, ContentManagers, and the possible subclasses.
Field Summary | |
static String |
DEF_CONTENT_HOME
Deprecated. Use DEF_CONTENT_MANAGER_HOME instead. |
static String |
DEF_CONTENT_MANAGER_HOME
Deprecated. The default ContentManagerHome name. |
static boolean |
DEF_CONTENT_READONLY
Deprecated. No longer needed. |
static String |
DEF_CONTENT_SCHEMA_HOME
Deprecated. Use PropertySetManager and ejb-refs instead. |
static String |
DEF_DOCUMENT_HOME
Deprecated. Use DEF_DOCUMENT_MANAGER_HOME instead. |
static String |
DEF_DOCUMENT_MANAGER_HOME
Deprecated. The default DocumentManagerHome name. |
static 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()
Deprecated. |
Method Summary | |
static Content[] |
getContent(String homeName,
Search s)
Deprecated. Return an array of Content from the ContentManager at the given name. |
static Content[] |
getContent(String homeName,
Search s)
Deprecated. Use new Search instead |
static Content[] |
getContent(String homeName,
Search s,
boolean readOnly)
Deprecated. Use getContent(String, Search) instead. |
static Content[] |
getContent(String homeName,
Search s,
boolean readOnly)
Deprecated. Use new content expressions and getContent(String, Search) instead. |
static Enumeration |
getContentFromManager(String homeName,
EJBHome home,
Search s)
Deprecated. use getContentManager(homeName, home).getContent(s) instead. |
static Enumeration |
getContentFromManager(String homeName,
EJBHome home,
Search s)
Deprecated. use new content search and getContentManager(homeName, home).getContent(s) instead. |
static Enumeration |
getContentFromManager(String homeName,
EJBHome home,
Search s,
boolean readOnly)
Deprecated. Use getContentManager(homeName, home).getContent(s); |
static Enumeration |
getContentFromManager(String homeName,
EJBHome home,
Search s,
boolean readOnly)
Deprecated. Use new content expressions and getContentManager(homeName, home).getContent(s); |
static Collection |
getContentIds(String homeName,
Search s)
Deprecated. Return an rray of Content from the ContentManager or ContentHome at the given name. |
static int |
getContentLength(long docSize,
int bytesLen)
Deprecated. Return the correct content length. |
static ContentManager |
getContentManager(String homeName)
Deprecated. Get a ContentManager from a JNDI home name. |
static ContentManager |
getContentManager(String homeName,
EJBHome home)
Deprecated. Get a ContentManager from an EJBHome. |
static String |
pathInfoEncode(String pathInfo)
Deprecated. Correctly URLEncode a path-info string. |
static Content[] |
toArray(Enumeration e)
Deprecated. Turn an Enumeration of Content into an array. |
static String |
toHTML(String in)
Deprecated. 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 String DEF_CONTENT_HOME
public static final 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 boolean DEF_CONTENT_READONLY
public static final String DEF_CONTENT_SCHEMA_HOME
public static final String DEF_DOCUMENT_HOME
public static final 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 String DEF_DOCUMENT_SCHEMA_HOME
public static boolean USE_SOFT_HASH_MAP
Constructor Detail |
public ContentHelper()
Method Detail |
public static Content[] getContent(String homeName, Search s) throws NamingException, RemoteException, FinderException, 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.
NamingException
- thrown if home cannot be found.
RemoteException
- thrown on communications error.
FinderException
- thrown on error in findBySearchParams (never
thrown)
IllegalArgumentException
- thrown on any other error.getContentManager(java.lang.String)
public static Content[] getContent(String homeName, Search s) throws NamingException, RemoteException, FinderException, 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.
NamingException
- thrown if home cannot be found.
RemoteException
- thrown on communications error.
FinderException
- thrown on error in findBySearchParams (never
thrown)
IllegalArgumentException
- thrown on any other error.getContentManager(java.lang.String)
,
Search
public static Content[] getContent(String homeName, Search s, boolean readOnly) throws NamingException, RemoteException, FinderException, 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.
NamingException
- thrown if home cannot be found.
RemoteException
- thrown on communications error.
FinderException
- thrown on error in findBySearchParams
IllegalArgumentException
- thrown on any other error.getContent(java.lang.String, com.bea.p13n.content.expression.Search)
public static Content[] getContent(String homeName, Search s, boolean readOnly) throws NamingException, RemoteException, FinderException, 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.
NamingException
- thrown if home cannot be found.
RemoteException
- thrown on communications error.
FinderException
- thrown on error in findBySearchParams
IllegalArgumentException
- thrown on any other error.getContent(java.lang.String, com.bea.p13n.content.expression.Search)
public static Enumeration getContentFromManager(String homeName, EJBHome home, Search s) throws RemoteException, IllegalArgumentException
homeName
- the JNDI home name (used for errors).home
- the EJBHome of the ContentManager.s
- the search parameters.
RemoteException
IllegalArgumentException
getContentManager(java.lang.String, javax.ejb.EJBHome)
public static Enumeration getContentFromManager(String homeName, EJBHome home, Search s) throws RemoteException, IllegalArgumentException
homeName
- the JNDI home name (used for errors).home
- the EJBHome of the ContentManager.s
- the search parameters.
RemoteException
IllegalArgumentException
getContentManager(java.lang.String, javax.ejb.EJBHome)
public static Enumeration getContentFromManager(String homeName, EJBHome home, Search s, boolean readOnly) throws RemoteException, 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).
RemoteException
IllegalArgumentException
getContentManager(java.lang.String, javax.ejb.EJBHome)
public static Enumeration getContentFromManager(String homeName, EJBHome home, Search s, boolean readOnly) throws RemoteException, 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).
RemoteException
IllegalArgumentException
getContentManager(java.lang.String, javax.ejb.EJBHome)
public static Collection getContentIds(String homeName, Search s) throws NamingException, RemoteException, FinderException, 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.
NamingException
- thrown if home cannot be found.
RemoteException
- thrown on communications error.
FinderException
- thrown on error in findBySearchParams (never
thrown)
IllegalArgumentException
- thrown on any other error.getContentManager(java.lang.String)
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 ContentManager getContentManager(String homeName) throws NamingException, CreateException, RemoteException, IllegalArgumentException
homeName
- the original home name.
NamingException
- thrown on a lookup error.
CreateException
- thrown on a creation error.
RemoteException
- thrown on an error.
IllegalArgumentException
- thrown on an invalid ejb home.getContentManager(java.lang.String, javax.ejb.EJBHome)
public static ContentManager getContentManager(String homeName, EJBHome home) throws CreateException, RemoteException, IllegalArgumentException
homeName
- the original home name.home
- the EJBHome.
CreateException
- thrown on a creation error.
RemoteException
- thrown on an error.
IllegalArgumentException
- thrown on an invalid ejb home.public static String pathInfoEncode(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 Content[] toArray(Enumeration e)
e
- the Enumeration.
ClassCastException
- thrown if the objects in the Enumeration
aren't Content objects.public static String toHTML(String in)
This will replace the characters '&', '"', '<', and '>' with '&', "', '<', and '>', respectively.
|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |