public class Property extends WcmObject implements IProperty, Serializable
Copyright (c) SAP AG 2001-2004
Modifier and Type | Field and Description |
---|---|
protected Properties |
m_attributes
The collection of property attributes
|
protected Date |
m_dateValue
The value if the type is Date
|
protected ResourceBundles |
m_res |
protected String |
m_value
The value
|
protected Object |
m_value_object |
protected List |
m_values
Values of multivalued property
|
ORDER_TYPE_MANUAL, ORDER_TYPE_NONE
Modifier | Constructor and Description |
---|---|
|
Property(IPropertyName name,
Boolean value)
Construct a new property of type BOOLEAN.
|
|
Property(IPropertyName name,
Boolean value,
Properties attributes)
Construct a new property of type BOOLEAN.
|
|
Property(IPropertyName name,
Date value)
Construct a new property of type DATE.
|
|
Property(IPropertyName name,
Date value,
Properties attributes)
Construct a new property of type DATE.
|
|
Property(IPropertyName name,
Integer value)
Construct a new property of type INTEGER.
|
|
Property(IPropertyName name,
Integer value,
Properties attributes)
Construct a new property of type INTEGER.
|
protected |
Property(IPropertyName name,
IPropertyDef def) |
|
Property(IPropertyName name,
IPropertyDef def,
Boolean value)
Construct a new property of type BOOLEAN.
|
|
Property(IPropertyName name,
IPropertyDef def,
Boolean value,
Properties attributes)
Construct a new property of type BOOLEAN.
|
|
Property(IPropertyName name,
IPropertyDef def,
Date value)
Construct a new property of type DATE.
|
|
Property(IPropertyName name,
IPropertyDef def,
Date value,
Properties attributes)
Construct a new property of type DATE.
|
|
Property(IPropertyName name,
IPropertyDef def,
Integer value)
Construct a new property of type INTEGER.
|
|
Property(IPropertyName name,
IPropertyDef def,
Integer value,
Properties attributes)
Construct a new property of type INTEGER.
|
|
Property(IPropertyName name,
IPropertyDef def,
List values)
Construct a new multi-valued property.
|
|
Property(IPropertyName name,
IPropertyDef def,
List values,
Properties attributes)
Construct a new multi-valued property.
|
|
Property(IPropertyName name,
IPropertyDef def,
Long value)
Construct a new property of type LONG.
|
|
Property(IPropertyName name,
IPropertyDef def,
Long value,
Properties attributes)
Construct a new property of type LONG.
|
|
Property(IPropertyName name,
IPropertyDef def,
Object value)
Construct a new property.
|
|
Property(IPropertyName name,
IPropertyDef def,
Object value,
Properties attributes)
Construct a new property.
|
|
Property(IPropertyName name,
IPropertyDef def,
String value)
Construct a new property of type STRING.
|
|
Property(IPropertyName name,
IPropertyDef def,
String value,
Properties attributes)
Construct a new property of type STRING.
|
|
Property(IPropertyName name,
IPropertyDef def,
XMLMarkup value)
Construct a new property of type XML.
|
|
Property(IPropertyName name,
IPropertyDef def,
XMLMarkup value,
Properties attributes)
Construct a new property of type XML.
|
|
Property(IPropertyName name,
Long value)
Construct a new property of type LONG.
|
|
Property(IPropertyName name,
Long value,
Properties attributes)
Construct a new property of type LONG.
|
|
Property(IPropertyName name,
Object value)
Construct a new property.
|
|
Property(IPropertyName name,
Object value,
Properties attributes)
Construct a new property.
|
protected |
Property(IPropertyName name,
PropertyType type,
boolean isMultivalued) |
|
Property(IPropertyName name,
PropertyType type,
List values)
Construct a new multi-valued property.
|
|
Property(IPropertyName name,
PropertyType type,
List values,
Properties attributes)
Construct a new multi-valued property.
|
|
Property(IPropertyName name,
String value)
Construct a new property of type STRING.
|
|
Property(IPropertyName name,
String value,
Properties attributes)
Construct a new property of type STRING.
|
|
Property(IPropertyName name,
XMLMarkup value)
Construct a new property of type XML.
|
|
Property(IPropertyName name,
XMLMarkup value,
Properties attributes)
Construct a new property of type XML.
|
protected |
Property(Property p)
Construct a property as a copy
|
Modifier and Type | Method and Description |
---|---|
static IProperty |
createContentLanguageProp(String value) |
static IProperty |
createContentLengthProp(long length) |
static IProperty |
createContentTypeProp(String value) |
static IProperty |
createCreatedByProp(String value) |
static IProperty |
createCreationDateProp(Date date) |
static IProperty |
createDescriptionProp(String value) |
static IProperty |
createDisplaynameProp(String value) |
static IProperty |
createETagProp(String value) |
static IProperty |
createHiddenProp(boolean value) |
static IProperty |
createLastModifiedByProp(String value) |
static IProperty |
createLastModifiedProp(Date date) |
static IProperty |
createPropertyFromStringValue(IPropertyName name,
PropertyType type,
String svalue) |
static IProperty |
createReadOnlyProp(boolean value) |
static IProperty |
createResourceTypeProp(String value) |
boolean |
equals(Object prop) |
String |
getAttribute(String name)
Get the value of an attribute
|
Properties |
getAttributes()
Returns a collection of attributes
|
boolean |
getBooleanValue()
Get the property value if the type is PropertyType.BOOLEAN
|
Date |
getDateValue()
Get the property value if the type is PropertyType.DATE
|
protected Date |
getDateValueRaw()
As opposed to
getDateValue() , this method tries to return the underlying date object and not a cloned copy of it (for performance reasons)
However you shoult note, that modifying the returned Date object will result in undefined behaviour! |
String |
getDescription()
Returns the description of the property
|
String |
getDescription(IResourceContext context) |
int |
getIntValue()
Get the property value if the type is PropertyType.INTEGER
|
long |
getLongIntValue()
Get the property value if the type is PropertyType.LONG
|
IMutableProperty |
getMutable()
Returns a copy of this propertry that can be modified
|
IPropertyDef |
getPropertyDef()
Get a reference to the proeprty definition.
|
IPropertyName |
getPropertyName()
Returns the property name
|
String |
getStringValue()
Get the property value if the type is String
|
PropertyType |
getType()
Return the property's data type
|
Object |
getValue()
Returns the property value as a Object if this is not a multi-valued property.
|
String |
getValueAsString()
Get the property value converted to a string.
|
List |
getValues()
Returns the property values if this is a multi-valued property.
|
int |
hashCode() |
boolean |
isMultivalued()
Returns true if the property is multi-valued
|
static boolean |
isSystemProperty(IPropertyName propName)
Returns true if it is the name of a system property
|
String |
toString()
Returns a string for debugging purposes.
|
protected void |
validateType(Object v)
Validates the instance of the property value
|
protected String m_value
protected Object m_value_object
protected Date m_dateValue
protected List m_values
protected Properties m_attributes
protected transient ResourceBundles m_res
public Property(IPropertyName name, String value) throws ResourceException
name
- The property namevalue
- The property string valueResourceException
public Property(IPropertyName name, Date value) throws ResourceException
name
- The property namevalue
- The property date valueResourceException
public Property(IPropertyName name, Boolean value) throws ResourceException
name
- The property namevalue
- The property boolean valueResourceException
public Property(IPropertyName name, Integer value) throws ResourceException
name
- The property namevalue
- The property integer valueResourceException
public Property(IPropertyName name, Long value) throws ResourceException
name
- The property namevalue
- The property long valueResourceException
public Property(IPropertyName name, XMLMarkup value) throws ResourceException
name
- The property namevalue
- The property xml valueResourceException
public Property(IPropertyName name, PropertyType type, List values) throws ResourceException
name
- The property nametype
- The property data typevalues
- A list of values. The list must contain suitable object
instances (String, Date, Integer, Long, Boolean, XMLMarkup) for the
specified property type.ResourceException
- If the instance of the value does not match
the property typepublic Property(IPropertyName name, Object value) throws ResourceException
name
- The property namevalue
- The value objectResourceException
- If the instance of the value parameter is not
allowedpublic Property(IPropertyName name, IPropertyDef def, String value) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Date value) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Boolean value) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Integer value) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Long value) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, XMLMarkup value) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Object value) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The value objectResourceException
- If the instance of the value parameter is not
allowed or does not matach the typepublic Property(IPropertyName name, IPropertyDef def, List values) throws ResourceException
name
- The property namedef
- The property definitionvalues
- A list of values. The list must contain suitable object
instances (String, Date, Integer, Long, Boolean, XMLMarkup) for the
specified property type.ResourceException
- If the instance of the value does not match
the property typepublic Property(IPropertyName name, String value, Properties attributes) throws ResourceException
name
- The property namevalue
- The property string valueattributes
- ResourceException
public Property(IPropertyName name, Date value, Properties attributes) throws ResourceException
name
- The property namevalue
- The property date valueattributes
- ResourceException
public Property(IPropertyName name, Boolean value, Properties attributes) throws ResourceException
name
- The property namevalue
- The property booelan valueattributes
- ResourceException
public Property(IPropertyName name, Integer value, Properties attributes) throws ResourceException
name
- The property namevalue
- The property integer valueResourceException
public Property(IPropertyName name, Long value, Properties attributes) throws ResourceException
name
- The property namevalue
- The property long valueResourceException
public Property(IPropertyName name, XMLMarkup value, Properties attributes) throws ResourceException
name
- The property namevalue
- The property xml valueResourceException
public Property(IPropertyName name, Object value, Properties attributes) throws ResourceException
name
- The property namevalue
- The value objectattributes
- ResourceException
- If the instance of the value parameter is not
allowedpublic Property(IPropertyName name, PropertyType type, List values, Properties attributes) throws ResourceException
name
- The property nametype
- The property data typevalues
- A list of values. The list must contain suitable object
instances (String, Date, Integer, Long, Boolean, XMLMarkup) for the
specified property type.attributes
- ResourceException
- If the instance of the value does not match
the property typepublic Property(IPropertyName name, IPropertyDef def, String value, Properties attributes) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Date value, Properties attributes) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Boolean value, Properties attributes) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Integer value, Properties attributes) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Long value, Properties attributes) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, XMLMarkup value, Properties attributes) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The property string valueResourceException
public Property(IPropertyName name, IPropertyDef def, Object value, Properties attributes) throws ResourceException
name
- The property namedef
- The property definitionvalue
- The value objectattributes
- ResourceException
- If the instance of the value parameter is not
allowed or does not matach the typepublic Property(IPropertyName name, IPropertyDef def, List values, Properties attributes) throws ResourceException
name
- The property namedef
- The property definitionvalues
- A list of values. The list must contain suitable object
instances (String, Date, Integer, Long, Boolean, XMLMarkup) for the
specified property type.attributes
- ResourceException
- If the instance of the value does not match
the property typeprotected Property(Property p)
p
- protected Property(IPropertyName name, IPropertyDef def) throws ResourceException
ResourceException
protected Property(IPropertyName name, PropertyType type, boolean isMultivalued) throws ResourceException
ResourceException
public IPropertyName getPropertyName()
IProperty
getPropertyName
in interface IProperty
public PropertyType getType()
IProperty
public boolean isMultivalued()
IProperty
isMultivalued
in interface IProperty
public IPropertyDef getPropertyDef()
IProperty
getPropertyDef
in interface IProperty
public String getValueAsString()
IProperty
getValueAsString
in interface IProperty
public boolean getBooleanValue()
IProperty
getBooleanValue
in interface IProperty
public int getIntValue()
IProperty
getIntValue
in interface IProperty
public long getLongIntValue()
IProperty
getLongIntValue
in interface IProperty
protected Date getDateValueRaw()
getDateValue()
, this method tries to return the underlying date object and not a cloned copy of it (for performance reasons)
However you shoult note, that modifying the returned Date object will result in undefined behaviour!public Date getDateValue()
IProperty
getDateValue
in interface IProperty
public String getStringValue()
IProperty
getStringValue
in interface IProperty
public List getValues() throws ResourceException
IProperty
getValues
in interface IProperty
ResourceException
public Object getValue() throws ResourceException
IProperty
getValue
in interface IProperty
ResourceException
public IMutableProperty getMutable()
IProperty
getMutable
in interface IProperty
public String getAttribute(String name) throws ResourceException
IProperty
getAttribute
in interface IProperty
name
- Attribute nameResourceException
public Properties getAttributes() throws ResourceException
IProperty
getAttributes
in interface IProperty
ResourceException
public String getDescription() throws WcmException
IProperty
getDescription
in interface IProperty
WcmException
- Exception raised in failure situationpublic String getDescription(IResourceContext context) throws WcmException
getDescription
in interface IProperty
WcmException
public String toString()
protected void validateType(Object v) throws ResourceException
v
- The value to setResourceException
public static boolean isSystemProperty(IPropertyName propName) throws ResourceException
propName
- ResourceException
public static IProperty createCreatedByProp(String value) throws ResourceException
ResourceException
public static IProperty createLastModifiedByProp(String value) throws ResourceException
ResourceException
public static IProperty createCreationDateProp(Date date) throws ResourceException
ResourceException
public static IProperty createHiddenProp(boolean value) throws ResourceException
ResourceException
public static IProperty createLastModifiedProp(Date date) throws ResourceException
ResourceException
public static IProperty createDescriptionProp(String value) throws ResourceException
ResourceException
public static IProperty createDisplaynameProp(String value) throws ResourceException
ResourceException
public static IProperty createReadOnlyProp(boolean value) throws ResourceException
ResourceException
public static IProperty createContentLengthProp(long length) throws ResourceException
ResourceException
public static IProperty createContentTypeProp(String value) throws ResourceException
ResourceException
public static IProperty createETagProp(String value) throws ResourceException
ResourceException
public static IProperty createContentLanguageProp(String value) throws ResourceException
ResourceException
public static IProperty createResourceTypeProp(String value) throws ResourceException
ResourceException
public static IProperty createPropertyFromStringValue(IPropertyName name, PropertyType type, String svalue) throws ResourceException
ResourceException
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice