|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.content.ui.jsp.templates.utils.TemplateSupport
public class TemplateSupport
Constructor Summary | |
---|---|
TemplateSupport()
|
Method Summary | |
---|---|
static boolean |
canUserConfigurePortlet(javax.servlet.http.HttpServletRequest request)
Determines if the current user is entitled to configure the current portlet. |
static boolean |
checkMimeType(Node node,
String mimeType)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is equal to the mime type that was passed in |
static Property |
getBinaryProperty(Node node)
This will take a best guess at which binary property represents the passed in node, and then return that property. |
static BinaryValue |
getBinaryValue(Node node)
This will take a best guess at which binary property represents the passed in node, and then return that binary vlaue. |
static String |
getDownloadURL(javax.servlet.http.HttpServletRequest request,
Node node)
This will take a best guess at which binary property represents the passed in node, and then return a url to the 'DownloadBinaryServlet' that can be used to download the binary belonging to that property. |
static String |
getDownloadURL(javax.servlet.http.HttpServletRequest request,
Node node,
Property property)
This will return a url to the 'DownloadBinaryServlet' that can be used to download the binary belonging to the property that is passed in. |
static String |
getEditButtonSrc(javax.servlet.http.HttpServletRequest request)
Deprecated The getEditButtonSrc(request) has been deprecated in 10.2, but will return TemplateSupport.DEFAULT_EDIT_BUTTON_SRC as the default value. Those that use this function are encouraged to use a direct image name rather than this function. |
static String |
getFileContents(Node node)
This will take a best guess at which binary property represents the passed in node, and then return the contents of the binary. |
static String |
getFileContentsForProperty(Node node,
Property property)
This will return the contents of the binary that corresponds to the passed in property. |
static String |
getImageNameForNode(Node node)
This is a utility method that will set get the name of the image file that best represents the binary file that belongs to the node, if any. |
static String |
getImageNameForNodeWithSize(Node node,
String sizeConstant)
This is a utility method that will set get the name of the image file that best represents the binary file that belongs to the node, if any. |
static String |
getImageSource(javax.servlet.http.HttpServletRequest request,
Node node)
This will take a best guess at which binary property represents the passed in node, and then return a url to the 'ShowPropertyServlet' that can be used to display the image belonging to that property. |
static String |
getImageSource(javax.servlet.http.HttpServletRequest request,
Node node,
Property property)
This will return a url to the 'ShowPropertyServlet' that can be used to display the image belonging to that property that is passed in. |
static String |
getImageSource(javax.servlet.http.HttpServletRequest request,
Node node,
String propertyName)
This will return a url to the 'ShowPropertyServlet' that can be used to display the image belonging to that property that is passed in. |
static String |
getPropertyDisplayValue(javax.servlet.http.HttpServletRequest request,
Node node,
String propertyName)
This will take the passed in property name and use it to create a String that will best show that property. |
static String |
getPropertyDisplayValueShowHTML(javax.servlet.http.HttpServletRequest request,
Node node,
Property property)
This will take the passed in property and use it to create a String that will best show that property. |
static Node |
getSingleNodeFromIterator(Iterator iterator)
This is a utility method that will return the first node that is contained within an iterator of Nodes. |
static Node |
getTemplateNode(javax.servlet.http.HttpServletRequest request)
This is a utility method that will return the first node that is contained within the managed iterator of Nodes. |
static Iterator |
getTemplateNodes(javax.servlet.http.HttpServletRequest request)
This utility method retrieves the current page of the resulting paged resultset. |
static Property |
getUsableProperty(Node node)
This will take a best guess at which property represents the passed in node, and then return that property. |
static String |
getUsablePropertyValue(Node node)
This will take a best guess at which property represents the passed in node, and then return the value of that property. |
static boolean |
isAudio(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'audio/' |
static boolean |
isContentSelectorException(Exception exception)
Determines if the passed in exception, is caused by the backing content selector |
static boolean |
isExcel(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'application/vnd.ms-excel', 'application/excel', 'application/x-excel', or 'application/x-msexcel' |
static boolean |
isExceptionAuthorizationException(Exception exception)
Determines if the passed in exception, or any causes of the exception, are an instance of com.bea.content.AuthorizationException. |
static boolean |
isExceptionDisplayTemplateException(Exception exception)
Determines if the passed in exception, is caused by errors within the templating framework. |
static boolean |
isExceptionInvalidQueryException(Exception exception)
Determines if the passed in exception, is caused by errors with the current query. |
static boolean |
isExceptionNodeListException(Exception exception)
Determines if the passed in exception, or any causes of the exception, are an instance of ContentUIException. |
static boolean |
isExceptionNoSuchNodeException(Exception exception)
Determines if the passed in exception, or any causes of the exception, are an instance of NoSuchNodeException. |
static boolean |
isFolder(Node node)
This will determine if a node is a folder (hierarchy) node. |
static boolean |
isGIF(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'image/gif' |
static boolean |
isHTML(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'text/html' |
static boolean |
isImage(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'image/' |
static boolean |
isJPEG(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'image/jpeg' |
static boolean |
isMSWord(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'application/vnd.ms-word' or 'application/msword' |
static boolean |
isNodePublished(Node node)
This convenience method determines if the passed in node is published. |
static boolean |
isPDF(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'application/pdf' |
static boolean |
isPlainText(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'text/plain' |
static boolean |
isPNG(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'image/png' |
static boolean |
isPortletDebugEnabled(javax.servlet.http.HttpServletRequest request)
Returns if portlet debugging is enabled. |
static boolean |
isPortletStatusPreview(javax.servlet.http.HttpServletRequest request)
Determines if the current portlet is in preview mode. |
static boolean |
isPortletThemeBorderless(javax.servlet.http.HttpServletRequest request)
Determines if the current portlet's theme is the OOTB Borderless theme. |
static boolean |
isPowerPoint(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'application/vnd.ms-powerpoint', 'application/mspowerpoint', or 'application/x-mspowerpoint' |
static boolean |
isRichText(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'text/richtext' |
static boolean |
isVideo(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'video/' |
static boolean |
isXML(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'text/xml' |
static boolean |
isZip(Node node)
This will take a best guess at which binary property represents the passed in node, and then check to see if that binary's mime type is 'application/zip' |
static void |
setObjectInContext(javax.servlet.http.HttpServletRequest request,
String attributeName,
Object object)
This is a utility method that will set the object as an attribute on the current request under the attribute name passed in. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NODE_IMAGE_ARCHIVE
public static final String NODE_IMAGE_AUDIO
public static final String NODE_IMAGE_EXCEL
public static final String NODE_IMAGE_GENERIC
public static final String NODE_IMAGE_HTML
public static final String NODE_IMAGE_IMAGE
public static final String NODE_IMAGE_PDF
public static final String NODE_IMAGE_POWERPOINT
public static final String NODE_IMAGE_TEXT
public static final String NODE_IMAGE_VIDEO
public static final String NODE_IMAGE_WORD
public static final String NODE_IMAGE_XML
public static final String NODE_IMAGE_FOLDER
public static final String NODE_LARGE_IMAGE_ARCHIVE
public static final String NODE_LARGE_IMAGE_AUDIO
public static final String NODE_LARGE_IMAGE_EXCEL
public static final String NODE_LARGE_IMAGE_GENERIC
public static final String NODE_LARGE_IMAGE_HTML
public static final String NODE_LARGE_IMAGE_IMAGE
public static final String NODE_LARGE_IMAGE_PDF
public static final String NODE_LARGE_IMAGE_POWERPOINT
public static final String NODE_LARGE_IMAGE_TEXT
public static final String NODE_LARGE_IMAGE_VIDEO
public static final String NODE_LARGE_IMAGE_WORD
public static final String NODE_LARGE_IMAGE_XML
public static final String NODE_LARGE_IMAGE_FOLDER
public static final String DEFAULT_EDIT_BUTTON_SRC
public static final String CONTENT_SELECTOR_ERROR_TAG
public static final String ICON_SIZE_16
public static final String ICON_SIZE_32
Constructor Detail |
---|
public TemplateSupport()
Method Detail |
---|
public static boolean isPlainText(Node node)
node
- - The node we want to inspect
public static boolean isRichText(Node node)
node
- - The node we want to inspect
public static boolean isHTML(Node node)
node
- - The node we want to inspect
public static boolean isXML(Node node)
node
- - The node we want to inspect
public static boolean isPDF(Node node)
node
- - The node we want to inspect
public static boolean isZip(Node node)
node
- - The node we want to inspect
public static boolean isMSWord(Node node)
node
- - The node we want to inspect
public static boolean isImage(Node node)
node
- - The node we want to inspect
public static boolean isJPEG(Node node)
node
- - The node we want to inspect
public static boolean isGIF(Node node)
node
- - The node we want to inspect
public static boolean isPNG(Node node)
node
- - The node we want to inspect
public static boolean isAudio(Node node)
node
- - The node we want to inspect
public static boolean isVideo(Node node)
node
- - The node we want to inspect
public static boolean isExcel(Node node)
node
- - The node we want to inspect
public static boolean isPowerPoint(Node node)
node
- - The node we want to inspect
public static boolean isFolder(Node node)
node
- - The node we want to inspect
public static boolean checkMimeType(Node node, String mimeType)
node
- - The node we want to inspectmimeType
- - The mime type we want to check
public static String getFileContents(Node node)
node
- - The node we want to inspect
public static String getFileContentsForProperty(Node node, Property property)
node
- - The node we want to inspectproperty
- - The property that contains the binary that we want to get
public static Property getBinaryProperty(Node node)
node
- - The node we want to inspect
public static BinaryValue getBinaryValue(Node node)
node
- - The node we want to inspect
public static String getImageSource(javax.servlet.http.HttpServletRequest request, Node node)
request
- - The current requestnode
- - The node we want to inspect
public static String getImageSource(javax.servlet.http.HttpServletRequest request, Node node, Property property)
request
- - The current requestnode
- - The node we want to inspectproperty
- - The property that contains the image we want to create the URL for
public static String getImageSource(javax.servlet.http.HttpServletRequest request, Node node, String propertyName)
request
- - The current requestnode
- - The node we want to inspectpropertyName
- - The name of the property that contains the image we want to create the URL for
public static String getDownloadURL(javax.servlet.http.HttpServletRequest request, Node node)
request
- - The current requestnode
- - The node we want to inspect
public static String getDownloadURL(javax.servlet.http.HttpServletRequest request, Node node, Property property)
request
- - The current requestnode
- - The node we want to inspectproperty
- - The property that contains the binary we want to create the URL for
public static String getUsablePropertyValue(Node node)
node
- - The node we want to inspect
public static Property getUsableProperty(Node node)
node
- - The node we want to inspect
public static String getPropertyDisplayValue(javax.servlet.http.HttpServletRequest request, Node node, String propertyName)
request
- - The current requestnode
- - The node we want to inspectpropertyName
- - The name of the property we want to get the display value for.
public static String getPropertyDisplayValueShowHTML(javax.servlet.http.HttpServletRequest request, Node node, Property property)
request
- - The current requestnode
- - The node we want to inspectproperty
- - The property we want to get the display value for.
public static Node getSingleNodeFromIterator(Iterator iterator)
iterator
- - The Node iterator used to get the first Node out of
public static Iterator getTemplateNodes(javax.servlet.http.HttpServletRequest request)
request
- - The current request
public static Node getTemplateNode(javax.servlet.http.HttpServletRequest request)
request
- - The request object.
getSingleNodeFromIterator(Iterator)
public static void setObjectInContext(javax.servlet.http.HttpServletRequest request, String attributeName, Object object)
request
- - The current requestattributeName
- - The name of the attribute the object will be set underobject
- - The object to be set as a request attributepublic static String getImageNameForNode(Node node)
node
- - The node whose icon we want to retrieve
public static String getImageNameForNodeWithSize(Node node, String sizeConstant)
node
- - The node whose icon we want to retrievesizeConstant
- - A constant for the size of icon to return. Either use ICON_SIZE_16 or ICON_SIZE_32
public static boolean isPortletStatusPreview(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
public static boolean isPortletThemeBorderless(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
public static boolean canUserConfigurePortlet(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
@Deprecated public static String getEditButtonSrc(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
public static boolean isExceptionNoSuchNodeException(Exception exception)
exception
- The exception to test
public static boolean isExceptionAuthorizationException(Exception exception)
exception
- The exception to test
public static boolean isExceptionNodeListException(Exception exception)
exception
- The exception to test
public static boolean isExceptionInvalidQueryException(Exception exception)
exception
- The exception to test
public static boolean isExceptionDisplayTemplateException(Exception exception)
exception
- The exception to test
public static boolean isContentSelectorException(Exception exception)
exception
- The exception to test
public static boolean isNodePublished(Node node)
node
- - The node we want to inspect
com.bea.content.virtual.workflow.Workflow.PUBLISHED
public static boolean isPortletDebugEnabled(javax.servlet.http.HttpServletRequest request)
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |