com.bea.content.el.support
Class PropertyWrapperImpl

java.lang.Object
  extended by com.bea.content.el.support.PropertyWrapperImpl

public class PropertyWrapperImpl
extends Object

This EL wrapper class implementation adds functionality around the Property class.

Here are some common examples:

     ${myNode.propertyMap['myBinaryPropertyName'].url.renderUrl}
     ${myNode.versions.versionById['3'].propertyMap['myNamedProperty'].value.stringValue}
 

See Also
Property, VersionServiceImpl, PropertyWrapperImpl, ValueWrapperImpl, UrlServiceImpl

Method Summary
 Property getAsProperty()
          This returns the actual property so that the resolver mechanism can be circumvented if necessary.
 String getAsTextHtml()
          Returns this property as text or html if the type is html or text.
 boolean getHasValue()
          See Property.hasValue()
 IconServiceImpl getIcon()
          Returns the icon service defined in the current web application.
 String getIndexedName()
          See Property.getIndexedName()
 boolean getIsAudio()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'audio/'
 boolean getIsBinary()
          Determines if the current property is of type Property.BINARY.
 boolean getIsBoolean()
          Determines if the current property is of type Property.BOOLEAN.
 boolean getIsCalendar()
          Determines if the current property is of type Property.CALENDAR
 boolean getIsDouble()
          Determines if the current property is of type Property.DOUBLE
 boolean getIsExcel()
          This will take a best guess at which binary property represents the passed in 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'
 boolean getIsGIF()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'image/gif'
 boolean getIsHTML()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'text/html'
 boolean getIsImage()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'image/'
 boolean getIsJPEG()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'image/jpeg'
 boolean getIsLink()
          Determines if the current property is of type Property.LINK
 boolean getIsLong()
          Determines if the current property is of type Property.LONG
 boolean getIsMSWord()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'application/vnd.ms-word' or 'application/msword'
 boolean getIsMultivalued()
          Determines if this property is multi-valued or not.
 boolean getIsNested()
          Determines if the current property is of type Property.NESTED.
 boolean getIsPDF()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'application/pdf'
 boolean getIsPlainText()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'text/plain'
 boolean getIsPNG()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'image/png'
 boolean getIsPowerPoint()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'application/vnd.ms-powerpoint', 'application/mspowerpoint', or 'application/x-mspowerpoint'
 boolean getIsPrimaryProperty()
          Determines if this property is the primary property.
 boolean getIsRequired()
          Determines if this property is required/mandatory.
 boolean getIsRestricted()
          Determines if this property is restricted.
 boolean getIsRichText()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'text/richtext'
 boolean getIsString()
          Determines if the current property is of type Property.STRING
 boolean getIsTextBased()
          This convenience method determine if this property is text-based.
 boolean getIsVideo()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'video/'
 boolean getIsXML()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'text/xml'
 boolean getIsZip()
          This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'application/zip'
 NodeWrapperImpl getLinkAsNode()
          Convenience method to retrieve a link property type as a NodeWrapperImpl, rather than an ID.
 String getName()
          See Property.getName()
 List<PropertyWrapperImpl[]> getNestedProperties()
          Convenience method to retrieve nested properties for this multi-valued property.
 PropertyWrapperImpl[] getNestedProperty()
          Convenience method to retrieve nested properties for this single-valued property.
 PropertyChoice[] getPropertyChoices()
          Returns an array of property choices for this particular property, if any.
 int getType()
          See Property.getType()
 UrlServiceImpl getUrl()
          Returns a URL service for this property.
 ValueWrapperImpl getValue()
          See Property.getValue()
 ValueWrapperImpl[] getValues()
          See Property.getValues()
 String toString()
          Retrieves toString on the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getAsProperty

public Property getAsProperty()
This returns the actual property so that the resolver mechanism can be circumvented if necessary.

This will allow retrieval of "real" properties rather than the wrappers.

Returns
The actual node.

getIndexedName

public String getIndexedName()
See Property.getIndexedName()

See Also
Property.getIndexedName()

getName

public String getName()
See Property.getName()

See Also
Property.getName()

getType

public int getType()
See Property.getType()

See Also
Property.getType()

getValue

public ValueWrapperImpl getValue()
See Property.getValue()

See Also
Property.getValue()

getValues

public ValueWrapperImpl[] getValues()
See Property.getValues()

See Also
Property.getValues()

getHasValue

public boolean getHasValue()
See Property.hasValue()

See Also
Property.hasValue()

getIsBinary

public boolean getIsBinary()
Determines if the current property is of type Property.BINARY.

Returns
true if the property is of type Property.BINARY

getIsNested

public boolean getIsNested()
Determines if the current property is of type Property.NESTED.

Returns
true if the property is of type Property.NESTED

getIsBoolean

public boolean getIsBoolean()
Determines if the current property is of type Property.BOOLEAN.

Returns
true if the property is of type Property.BOOLEAN

getIsLong

public boolean getIsLong()
Determines if the current property is of type Property.LONG

Returns
true if the property is of type Property.LONG

getIsDouble

public boolean getIsDouble()
Determines if the current property is of type Property.DOUBLE

Returns
true if the property is of type Property.DOUBLE

getIsString

public boolean getIsString()
Determines if the current property is of type Property.STRING

Returns
true if the property is of type Property.STRING

getIsCalendar

public boolean getIsCalendar()
Determines if the current property is of type Property.CALENDAR

Returns
true if the property is of type Property.CALENDAR

getIsLink

public boolean getIsLink()
Determines if the current property is of type Property.LINK

Returns
true if the property is of type Property.LINK

getIsPlainText

public boolean getIsPlainText()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'text/plain'

Returns
boolean - true if the mime type is 'text/plain'

getIsRichText

public boolean getIsRichText()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'text/richtext'

Returns
boolean - true if the mime type is 'text/richtext'

getIsHTML

public boolean getIsHTML()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'text/html'

Returns
boolean - true if the mime type is 'text/html'

getIsTextBased

public boolean getIsTextBased()
This convenience method determine if this property is text-based.

The following criteria is used to determine the return value:

Returns
boolean - true if this property is text-based, false otherwise.

getIsXML

public boolean getIsXML()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'text/xml'

Returns
boolean - true if the mime type is 'text/xml'

getIsPDF

public boolean getIsPDF()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'application/pdf'

Returns
boolean - true if the mime type is 'application/pdf'

getIsZip

public boolean getIsZip()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'application/zip'

Returns
boolean - true if the mime type is 'application/zip'

getIsMSWord

public boolean getIsMSWord()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'application/vnd.ms-word' or 'application/msword'

Returns
boolean - true if the mime type is 'application/vnd.ms-word' or 'application/msword'

getIsImage

public boolean getIsImage()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'image/'

Returns
boolean - true if the mime type is 'image/'

getIsJPEG

public boolean getIsJPEG()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'image/jpeg'

Returns
boolean - true if the mime type is 'image/jpeg'

getIsGIF

public boolean getIsGIF()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'image/gif'

Returns
boolean - true if the mime type is 'image/gif'

getIsPNG

public boolean getIsPNG()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'image/png'

Returns
boolean - true if the mime type is 'image/png'

getIsAudio

public boolean getIsAudio()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'audio/'

Returns
boolean - true if the mime type is 'audio/'

getIsVideo

public boolean getIsVideo()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'video/'

Returns
boolean - true if the mime type is 'video/'

getIsExcel

public boolean getIsExcel()
This will take a best guess at which binary property represents the passed in 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'

Returns
boolean - true if the mime type matches an Excel file

getIsPowerPoint

public boolean getIsPowerPoint()
This will take a best guess at which binary property represents the passed in and then check to see if that binary's mime type is 'application/vnd.ms-powerpoint', 'application/mspowerpoint', or 'application/x-mspowerpoint'

Returns
boolean - true if the mime type matches a PowerPoint file

getIsMultivalued

public boolean getIsMultivalued()
Determines if this property is multi-valued or not.

Returns
True if the property is multi-valued, or false otherwise or an exception occurs.

getPropertyChoices

public PropertyChoice[] getPropertyChoices()
Returns an array of property choices for this particular property, if any.

Returns
an array of com.bea.content.PropertyChoice, or null if there are none.

getIsRestricted

public boolean getIsRestricted()
Determines if this property is restricted.

Returns
True if the property is restricted, or false otherwise or an exception occurs.

getIsRequired

public boolean getIsRequired()
Determines if this property is required/mandatory.

Returns
True if the property is required, or false otherwise or an exception occurs.

getIsPrimaryProperty

public boolean getIsPrimaryProperty()
Determines if this property is the primary property.

Returns
True if the property is the primary property, or false otherwise or an exception occurs.

getUrl

public UrlServiceImpl getUrl()
Returns a URL service for this property.

Returns
An instance of UrlServiceImpl.

getIcon

public IconServiceImpl getIcon()
Returns the icon service defined in the current web application.


toString

public String toString()
Retrieves toString on the property.

Overrides:
toString in class Object

getNestedProperty

public PropertyWrapperImpl[] getNestedProperty()
Convenience method to retrieve nested properties for this single-valued property.

If the type of this property is not of type Property.NESTED, null is returned.

If the value of the property is multi-valued, the first nested value will be returned. See also getNestedProperties()

Returns
An array of PropertyWrapperImpl

getNestedProperties

public List<PropertyWrapperImpl[]> getNestedProperties()
Convenience method to retrieve nested properties for this multi-valued property.

If the type of this property is not of type Property.NESTED, an empty collection is returned.

Returns
A collection of PropertyWrapperImpl arrays.

getLinkAsNode

public NodeWrapperImpl getLinkAsNode()
Convenience method to retrieve a link property type as a NodeWrapperImpl, rather than an ID.

This method will return a NodeWrapperImpl if the property type is of type Property.LINK, or null if it is not or the value is not set.

Returns
An instance of NodeWrapperImpl

getAsTextHtml

public String getAsTextHtml()
Returns this property as text or html if the type is html or text.

If isHTML or isPlainText is true, the text or html is returned as a string.

Note:Caution should be taken when invoking this method on properties with large documents. For those properties that contain large documents, the <cm:getProperty> tag instead. should be used.

This property must be text-based to return it's contents. These include:

Returns
Returns text/html if the property is text-based, null otherwise


Copyright © 2011, Oracle. All rights reserved.