public class CmsClientProperty
extends java.lang.Object
implements com.google.gwt.user.client.rpc.IsSerializable
限定符和类型 | 类和说明 |
---|---|
static class |
CmsClientProperty.Mode
An enum used for addressing a specific value in a property.
|
限定符和类型 | 字段和说明 |
---|---|
static com.google.common.base.Function<java.lang.String,CmsClientProperty> |
CREATE_PROPERTY
Construction function which creates a new property with a given name.
|
static java.lang.String |
PATH_RESOURCE_VALUE
The path component identifying a resource value.
|
static java.lang.String |
PATH_STRUCTURE_VALUE
The path component identifying a structure value.
|
static java.lang.String |
PROPERTY_COPYRIGHT
The copyright property name.
|
static java.lang.String |
PROPERTY_DEFAULTFILE
The default-file property name.
|
static java.lang.String |
PROPERTY_DESCRIPTION
The Description property name.
|
static java.lang.String |
PROPERTY_NAVINFO
The NavPos property name.
|
static java.lang.String |
PROPERTY_NAVPOS
The NavPos property name.
|
static java.lang.String |
PROPERTY_NAVTEXT
The NavText property name.
|
static java.lang.String |
PROPERTY_TEMPLATE
The NavText property name.
|
static java.lang.String |
PROPERTY_TITLE
The Title property name.
|
限定符 | 构造器和说明 |
---|---|
protected |
CmsClientProperty()
Empty default constructor, used for serialization.
|
|
CmsClientProperty(CmsClientProperty property)
Copy constructor.
|
|
CmsClientProperty(java.lang.String name,
java.lang.String structureValue,
java.lang.String resourceValue)
Creates a new client property bean.
|
限定符和类型 | 方法和说明 |
---|---|
static java.util.Map<java.lang.String,CmsClientProperty> |
copyProperties(java.util.Map<java.lang.String,CmsClientProperty> props)
Helper method for copying a map of properties.
|
java.lang.String |
getEffectiveValue()
Returns the effective value of the property.
|
java.lang.String |
getName()
Returns the name of the property.
|
java.lang.String |
getOrigin()
Gets the origin of the property (might return null).
|
CmsPathValue |
getPathValue()
Returns the effective path value of the property.
|
CmsPathValue |
getPathValue(CmsClientProperty.Mode mode)
Gets the path value for a specific access mode.
|
static CmsPathValue |
getPathValue(CmsClientProperty property,
CmsClientProperty.Mode mode)
Gets the path value for a property object (which may be null) and a property access mode.
|
java.lang.String |
getResourceValue()
Returns the resource value of the property.
|
java.lang.String |
getStructureValue()
Returns the structure value of the property.
|
boolean |
isEmpty()
Checks if both values of the property are empty.
|
static boolean |
isPropertyEmpty(CmsClientProperty prop)
Checks if a property is null or empty.
|
static java.util.Map<java.lang.String,CmsClientProperty> |
makeLazyCopy(java.util.Map<java.lang.String,CmsClientProperty> properties)
Makes a "lazy copy" of a map of properties, which will create properties on lookup if they don't already exist.
|
static void |
removeEmptyProperties(java.util.Map<java.lang.String,CmsClientProperty> props)
Helper method for removing empty properties from a map.
|
void |
setOrigin(java.lang.String origin)
Sets the origin of the property.
|
void |
setResourceValue(java.lang.String resourceValue)
Sets the resource value .
|
void |
setStructureValue(java.lang.String structureValue)
Sets the structure value.
|
static java.util.Map<java.lang.String,CmsClientProperty> |
toLazyMap(java.util.Map<java.lang.String,CmsClientProperty> properties)
Creates a lazy property map which creates properties on lookup if they don'T exist.
|
java.lang.String |
toString() |
CmsClientProperty |
withOrigin(java.lang.String origin)
Creates a copy of the property, but changes the origin in the copy.
|
public static final com.google.common.base.Function<java.lang.String,CmsClientProperty> CREATE_PROPERTY
public static final java.lang.String PATH_RESOURCE_VALUE
public static final java.lang.String PATH_STRUCTURE_VALUE
public static final java.lang.String PROPERTY_COPYRIGHT
public static final java.lang.String PROPERTY_DEFAULTFILE
public static final java.lang.String PROPERTY_DESCRIPTION
public static final java.lang.String PROPERTY_NAVINFO
public static final java.lang.String PROPERTY_NAVPOS
public static final java.lang.String PROPERTY_NAVTEXT
public static final java.lang.String PROPERTY_TEMPLATE
public static final java.lang.String PROPERTY_TITLE
public CmsClientProperty(CmsClientProperty property)
property
- the object from which to copy the datapublic CmsClientProperty(java.lang.String name, java.lang.String structureValue, java.lang.String resourceValue)
name
- the property namestructureValue
- the structure valueresourceValue
- the resource valueprotected CmsClientProperty()
public static java.util.Map<java.lang.String,CmsClientProperty> copyProperties(java.util.Map<java.lang.String,CmsClientProperty> props)
props
- the property map to copypublic static CmsPathValue getPathValue(CmsClientProperty property, CmsClientProperty.Mode mode)
property
- the property which values to accessmode
- the property access modepublic static boolean isPropertyEmpty(CmsClientProperty prop)
prop
- the property to checkpublic static java.util.Map<java.lang.String,CmsClientProperty> makeLazyCopy(java.util.Map<java.lang.String,CmsClientProperty> properties)
properties
- the properties to copypublic static void removeEmptyProperties(java.util.Map<java.lang.String,CmsClientProperty> props)
props
- the map from which to remove empty propertiespublic static java.util.Map<java.lang.String,CmsClientProperty> toLazyMap(java.util.Map<java.lang.String,CmsClientProperty> properties)
properties
- the properties which should be initially put into the mappublic java.lang.String getEffectiveValue()
public java.lang.String getName()
public java.lang.String getOrigin()
public CmsPathValue getPathValue()
public CmsPathValue getPathValue(CmsClientProperty.Mode mode)
mode
- the access modepublic java.lang.String getResourceValue()
public java.lang.String getStructureValue()
public boolean isEmpty()
public void setOrigin(java.lang.String origin)
origin
- the origin root path of the propertypublic void setResourceValue(java.lang.String resourceValue)
resourceValue
- the new resource valuepublic void setStructureValue(java.lang.String structureValue)
structureValue
- the new structure valuepublic java.lang.String toString()
toString
在类中 java.lang.Object
Object.toString()
public CmsClientProperty withOrigin(java.lang.String origin)
origin
- the new origin