Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-05


oracle.wcps.property
Interface IPropertyDefinition

All Superinterfaces:
ITimestamped
All Known Implementing Classes:
PropertyDefinition

public interface IPropertyDefinition
extends ITimestamped

Represents a namespace scoped definition for a property's value. This defines following features for a property's value.

Type
Type for a property value.
Restricted Value(s)
If the method isRestricted() returns to true, the restricted values set shouldn't be empty. The value of a property referring this should be the member of the restricted values set.
Default Value(s)
If set, the default value is used as property value if there is no value set to a property.
Validator Class Name
A custom class implementing IValidator interface that is used for further validation of the value of a property referring this.
Validator Value
A string value to pass to the custom validator class associated with this.

This is used by creating a property mapping IPropertyMapping of a property name IProperty.getName() and name of this getName() in a propertysetdefinition IPropertySetDefinition. The value of a property will be validated for the above features by the property service and ValidationFailedException is thrown if validation fails.

See Also:
IPropertySetDefinition, IPropertyMapping, IValidator

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.
 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.
 Type getType()
          Returns the property value's type, one of Type enums.
 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.
 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> values)
          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 name)
          Sets the given propertydefinition name as the name for this.
 void setNamespaceName(INamespaceName namespaceName)
          Deprecated. it is a no op.
 void setRestricted(boolean value)
          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> values)
          Sets the given values as the restricted values set for this.
 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 value)
          Sets the given value as the validator value to be passed to an instance of the custom validator class set in this.

 

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

 

Method Detail

getNamespaceName

INamespaceName getNamespaceName()
Returns the associated namespace name.
Returns:
the associated namespace name.

setNamespaceName

void setNamespaceName(INamespaceName namespaceName)
Deprecated. it is a no op.
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()
Parameters:
namespaceName - the namespace name to which this will be associated.

name

java.lang.String name()
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].
Returns:
the string representation of the composite name.

getName

IPropertyDefinitionName getName()
Returns the propertydefinition name of this.
Returns:
the propertydefinition name of this.

setName

void setName(IPropertyDefinitionName name)
Sets the given propertydefinition name as the name for this.
Parameters:
name - a propertydefinition name.

getDescription

java.lang.String getDescription()
Returns a brief description of this.
Returns:
a brief description.

setDescription

void setDescription(java.lang.String desc)
Sets the given desc as a brief description for this.
Parameters:
desc - a brief description.

getType

Type getType()
Returns the property value's type, one of Type enums. This enum type used for validating property value for a property referring this.
Returns:
the type associated with this.

setType

void setType(Type type)
Sets the given enum type as this propertydefinition's type.
Parameters:
type - the enum type.

isRestricted

boolean isRestricted()
Indicates if a property's value(s) is/are restricted or not.
Returns:
true if a property's values are restricted to the restricted values set of this, otherwise false.

setRestricted

void setRestricted(boolean value)
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.
Parameters:
value - a boolean value.

getRestrictedValues

java.util.List<? extends java.io.Serializable> getRestrictedValues()
Returns the set of restricted values.
Returns:
the set of restricted values if this is a restricted propertydefinition otherwise empty list.

setRestrictedValues

void setRestrictedValues(java.util.List<? extends java.io.Serializable> values)
Sets the given values as the restricted values set for this. The values type should match the type returned by getType().
Parameters:
values - a restricted values set for this.
Throws:
java.lang.IllegalStateException - if isRestricted() returns false. Call setRestricted(boolean) with the true value before calling this method to avoid getting this exception.

addRestrictedValue

boolean addRestrictedValue(java.io.Serializable value)
Adds the given value to the restricted values set.
Parameters:
value - a restricted value.
Returns:
true if the given value is added successfully.
Throws:
java.lang.IllegalStateException - if isRestricted() returns false. Call setRestricted(boolean) with the true value before calling this method to avoid getting this exception.

removeRestrictedValue

boolean removeRestrictedValue(java.io.Serializable value)
Removes the given value from the restricted values set.
Parameters:
value - a restricted value, a member of the restricted values set.
Returns:
true if the given value is removed successfully.
Throws:
java.lang.IllegalStateException - if isRestricted() returns false. Call setRestricted(boolean) with true value before calling this method to avoid getting this exception.

getDefaultValues

java.util.List<? extends java.io.Serializable> getDefaultValues()
Returns the set of default value(s).
Returns:
the set of default value(s) to use if the property's value is not set in a propertyset.

setDefaultValues

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

addDefaultValue

boolean addDefaultValue(java.io.Serializable value)
Adds the given value to the default values set for this.
Parameters:
value - a default value.
Returns:
true if the given value is added successfully.

removeDefaultValue

boolean removeDefaultValue(java.io.Serializable value)
Removes the given value from the default values set.
Parameters:
value - a default value, a member of the default values set.
Returns:
true if the given value is removed successfully.

getValidatorClassName

java.lang.String getValidatorClassName()
Returns the custom validator class name associated with this.
Returns:
the fully qualified custom validator class name associated with this.

setValidatorClassName

void setValidatorClassName(java.lang.String validatorClassName)
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.
Parameters:
validatorClassName - a fully qualified custom validate class name.

getValidatorValue

java.lang.String getValidatorValue()
Returns the validator value to be passed to the custom validator class associated with this.
Returns:
the string representation of the validator value.

setValidatorValue

void setValidatorValue(java.lang.String value)
Sets the given value as the validator value to be passed to an instance of the custom validator class set in this.
Parameters:
value - the string representation of the validator value.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)
E15995-05


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