Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.4.0)
E15995-03


oracle.wcps.property.model
Class PropertyDefinition

java.lang.Object
  extended by oracle.wcps.property.model.Timestamped
      extended by oracle.wcps.property.model.PropertyDefinition

All Implemented Interfaces:
java.io.Serializable, IPropertyDefinition, ITimestamped

public class PropertyDefinition
extends Timestamped
implements IPropertyDefinition, java.io.Serializable

An implementation of IPropertyDefinition. Use the builder builder(oracle.wcps.property.Type, boolean) to create an instance of this.

See Also:
Serialized Form

Nested Class Summary
static class PropertyDefinition.Builder
          The builder used for creating a PropertyDefinition.

 

Method Summary
 boolean addDefaultValue(java.io.Serializable value)
          Adds the given value to the default values set for this.
 boolean addRestrictedValue(java.io.Serializable value)
          Adds the given value to the restricted values set.
static PropertyDefinition.Builder builder(Type dataType, boolean restricted)
          Returns an instance of Builder to create a PropertyDefinition.
 boolean containsValue(java.io.Serializable value)
           
 boolean equals(java.lang.Object o)
           
 java.io.Serializable getDefaultValue()
           
 java.util.List<? extends java.io.Serializable> getDefaultValues()
          Returns the set of default value(s).
 java.lang.String getDescription()
          Returns a brief description of this.
 IPropertyDefinitionName getName()
          Returns the propertydefinition name of this.
 INamespaceName getNamespaceName()
          Returns the associated namespace name.
 java.util.List<? extends java.io.Serializable> getRestrictedValues()
          Returns the set of restricted values.
 java.lang.Object getRPropertyDefinition()
           
 Type getType()
          Returns the property value's type, one of Type enums.
 IValidator getValidator()
           
 java.lang.String getValidatorClassName()
          Returns the custom validator class name associated with this.
 java.lang.String getValidatorValue()
          Returns the validator value to be passed to the custom validator class associated with this.
 int hashCode()
           
 boolean isRestricted()
          Indicates if a property's value(s) is/are restricted or not.
 java.lang.String name()
          Returns the string representation of the composite name of this.
 boolean removeDefaultValue(java.io.Serializable value)
          Removes the given value from the default values set.
 boolean removeRestrictedValue(java.io.Serializable value)
          Removes the given value from the restricted values set.
 void setDefaultValues(java.util.List<? extends java.io.Serializable> defaultValues)
          Sets the given values as the default value(s) set for this.
 void setDescription(java.lang.String desc)
          Sets the given desc as a brief description for this.
 void setName(IPropertyDefinitionName propertyDefinitionName)
          Sets the given propertydefinition name as the name for this.
 void setNamespaceName(INamespaceName namespaceName)
          Sets the given namespaceName as the associated namespace name.
 void setRestricted(boolean restricted)
          Sets the given boolean value to indicate if a property's values are restricted or not.
 void setRestrictedValues(java.util.List<? extends java.io.Serializable> restrictedValues)
          Sets the given values as the restricted values set for this.
 void setRPropertyDefinition(java.lang.Object rPropertyDefinition)
           
 void setType(Type type)
          Sets the given enum type as this propertydefinition's type.
 void setValidatorClassName(java.lang.String validatorClassName)
          Sets the given validatorClassName as the custom validator class used to further validate a property's value.
 void setValidatorValue(java.lang.String validatorValue)
          Sets the given value as the validator value to be passed to an instance of the custom validator class set in this.
 java.lang.String toString()
           

 

Methods inherited from class oracle.wcps.property.model.Timestamped
getCreatedOn, getUpdatedOn, setCreatedOn, setUpdatedOn

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface oracle.wcps.property.ITimestamped
getCreatedOn, getUpdatedOn, setCreatedOn, setUpdatedOn

 

Method Detail

getNamespaceName

public INamespaceName getNamespaceName()
Description copied from interface: IPropertyDefinition
Returns the associated namespace name.
Specified by:
getNamespaceName in interface IPropertyDefinition
Returns:
the associated namespace name.

setNamespaceName

public void setNamespaceName(INamespaceName namespaceName)
Description copied from interface: IPropertyDefinition
Sets the given namespaceName as the associated namespace name. Note: Calling this has no effect when using methods of IPropertyService, its overwritten with the namespace name in IPropertyService.getNamespaceName()
Specified by:
setNamespaceName in interface IPropertyDefinition
Parameters:
namespaceName - the namespace name to which this will be associated.

name

public java.lang.String name()
Description copied from interface: IPropertyDefinition
Returns the string representation of the composite name of this. It is created by combining [string representation of the namespace name of this]:[string representation of the propertydefinition name of this].
Specified by:
name in interface IPropertyDefinition
Returns:
the string representation of the composite name.

getName

public IPropertyDefinitionName getName()
Description copied from interface: IPropertyDefinition
Returns the propertydefinition name of this.
Specified by:
getName in interface IPropertyDefinition
Returns:
the propertydefinition name of this.

setName

public void setName(IPropertyDefinitionName propertyDefinitionName)
Description copied from interface: IPropertyDefinition
Sets the given propertydefinition name as the name for this.
Specified by:
setName in interface IPropertyDefinition
Parameters:
propertyDefinitionName - a propertydefinition name.

getDescription

public java.lang.String getDescription()
Description copied from interface: IPropertyDefinition
Returns a brief description of this.
Specified by:
getDescription in interface IPropertyDefinition
Returns:
a brief description.

setDescription

public void setDescription(java.lang.String desc)
Description copied from interface: IPropertyDefinition
Sets the given desc as a brief description for this.
Specified by:
setDescription in interface IPropertyDefinition
Parameters:
desc - a brief description.

getType

public Type getType()
Description copied from interface: IPropertyDefinition
Returns the property value's type, one of Type enums. This enum type used for validating property value for a property referring this.
Specified by:
getType in interface IPropertyDefinition
Returns:
the type associated with this.

setType

public void setType(Type type)
Description copied from interface: IPropertyDefinition
Sets the given enum type as this propertydefinition's type.
Specified by:
setType in interface IPropertyDefinition
Parameters:
type - the enum type.

isRestricted

public boolean isRestricted()
Description copied from interface: IPropertyDefinition
Indicates if a property's value(s) is/are restricted or not.
Specified by:
isRestricted in interface IPropertyDefinition
Returns:
true if a property's values are restricted to the restricted values set of this, otherwise false.

setRestricted

public void setRestricted(boolean restricted)
Description copied from interface: IPropertyDefinition
Sets the given boolean value to indicate if a property's values are restricted or not. Make sure to add values to the restricted values set for this.
Specified by:
setRestricted in interface IPropertyDefinition
Parameters:
restricted - a boolean value.

getRestrictedValues

public java.util.List<? extends java.io.Serializable> getRestrictedValues()
Description copied from interface: IPropertyDefinition
Returns the set of restricted values.
Specified by:
getRestrictedValues in interface IPropertyDefinition
Returns:
the set of restricted values if this is a restricted propertydefinition otherwise empty list.

setRestrictedValues

public void setRestrictedValues(java.util.List<? extends java.io.Serializable> restrictedValues)
Description copied from interface: IPropertyDefinition
Sets the given values as the restricted values set for this. The values type should match the type returned by IPropertyDefinition.getType().
Specified by:
setRestrictedValues in interface IPropertyDefinition
Parameters:
restrictedValues - a restricted values set for this.

addRestrictedValue

public boolean addRestrictedValue(java.io.Serializable value)
Description copied from interface: IPropertyDefinition
Adds the given value to the restricted values set.
Specified by:
addRestrictedValue in interface IPropertyDefinition
Parameters:
value - a restricted value.
Returns:
true if the given value is added successfully.

removeRestrictedValue

public boolean removeRestrictedValue(java.io.Serializable value)
Description copied from interface: IPropertyDefinition
Removes the given value from the restricted values set.
Specified by:
removeRestrictedValue in interface IPropertyDefinition
Parameters:
value - a restricted value, a member of the restricted values set.
Returns:
true if the given value is removed successfully.

getDefaultValues

public java.util.List<? extends java.io.Serializable> getDefaultValues()
Description copied from interface: IPropertyDefinition
Returns the set of default value(s).
Specified by:
getDefaultValues in interface IPropertyDefinition
Returns:
the set of default value(s) to use if the property's value is not set in a propertyset.

setDefaultValues

public void setDefaultValues(java.util.List<? extends java.io.Serializable> defaultValues)
Description copied from interface: IPropertyDefinition
Sets the given values as the default value(s) set for this. The values type should match the type returned by IPropertyDefinition.getType().
Specified by:
setDefaultValues in interface IPropertyDefinition
Parameters:
defaultValues - a default values set for this.

addDefaultValue

public boolean addDefaultValue(java.io.Serializable value)
Description copied from interface: IPropertyDefinition
Adds the given value to the default values set for this.
Specified by:
addDefaultValue in interface IPropertyDefinition
Parameters:
value - a default value.
Returns:
true if the given value is added successfully.

removeDefaultValue

public boolean removeDefaultValue(java.io.Serializable value)
Description copied from interface: IPropertyDefinition
Removes the given value from the default values set.
Specified by:
removeDefaultValue in interface IPropertyDefinition
Parameters:
value - a default value, a member of the default values set.
Returns:
true if the given value is removed successfully.

getValidatorClassName

public java.lang.String getValidatorClassName()
Description copied from interface: IPropertyDefinition
Returns the custom validator class name associated with this.
Specified by:
getValidatorClassName in interface IPropertyDefinition
Returns:
the fully qualified custom validator class name associated with this.

setValidatorClassName

public void setValidatorClassName(java.lang.String validatorClassName)
Description copied from interface: IPropertyDefinition
Sets the given validatorClassName as the custom validator class used to further validate a property's value. The custom validator class should implement IValidator interface.
Specified by:
setValidatorClassName in interface IPropertyDefinition
Parameters:
validatorClassName - a fully qualified custom validate class name.

getValidatorValue

public java.lang.String getValidatorValue()
Description copied from interface: IPropertyDefinition
Returns the validator value to be passed to the custom validator class associated with this.
Specified by:
getValidatorValue in interface IPropertyDefinition
Returns:
the string representation of the validator value.

setValidatorValue

public void setValidatorValue(java.lang.String validatorValue)
Description copied from interface: IPropertyDefinition
Sets the given value as the validator value to be passed to an instance of the custom validator class set in this.
Specified by:
setValidatorValue in interface IPropertyDefinition
Parameters:
validatorValue - the string representation of the validator value.

getRPropertyDefinition

public java.lang.Object getRPropertyDefinition()

setRPropertyDefinition

public void setRPropertyDefinition(java.lang.Object rPropertyDefinition)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class Timestamped

hashCode

public int hashCode()
Overrides:
hashCode in class Timestamped

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDefaultValue

public java.io.Serializable getDefaultValue()

builder

public static PropertyDefinition.Builder builder(Type dataType,
                                                 boolean restricted)
Returns an instance of Builder to create a PropertyDefinition.
Parameters:
dataType - the type of property value that this propertydefinition instance will validate.
restricted - indicates if the property value should be treated as restricted or not.
Returns:
an instance of Builder.

containsValue

public boolean containsValue(java.io.Serializable value)

getValidator

public IValidator getValidator()

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.4.0)
E15995-03


Copyright © 2009, 2011, Oracle and/or its affiliates. All rights reserved.