Skip navigation links

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


Package oracle.wcps.property

Provides interfaces and classes to create property service entities such as namespaces, property definitions, propertyset definitions, and propertysets.

See:
          Description

Interface Summary
IContext The property service context interface to manage set of properties used by the property service.
IDefinitionLocator A locator used for managing propertydefinitions and propertysetdefinitions.
IName Represents a non null and URL safe name for the property service entities.
INamespace Represents a namespace to scope the property service entities propertydefinitions, propertysetdefinitions and propertysets.
INamespaceName Represents a namespace entity's name.
IPagedList<T> Represents a paged list based on a PaginationContext.
IPredicate<T> An interface for predicates whose apply method is called for each entity t found in a list.
IProperty<T extends Serializable> Represents a single property that encapsulates a name and Serializable value pair.
IPropertyDefinition Represents a namespace scoped definition for a property's value.
IPropertyDefinitionName Represents a propertydefinition entity's name.
IPropertyLocator A locator used for managing propertysets.
IPropertyMapping Represents a mapping of property name, propertydefinition name and optionally a property locator class name.
IPropertyName Represents a property entity's name.
IPropertyService A namespace scoped property service to manage propertydefinitions, propertysetdefinitions and propertysets.
IPropertyServiceFactory The factory interface to manage INamespace and IPropertyService instances.
IPropertySet Represents a set of related properties scoped to a propertysetdefinition and a namespace.
IPropertySetDefinition Represents a schema or a structure for propertysets within a namespace.
IPropertySetDefinitionName Represents a propertysetdefinition entity's name.
IPropertySetName Represents a propertyset entity's name.
ITimestamped Manages created on and updated on datetime for the property service entities.
IValidator<T extends Serializable> Validates a property's value before a property or propertyset is created or updated.
PropertyValue A wrapper for property values.

 

Class Summary
BlobData Encapsulates a blob value.
ClobData Encapsulates a large string.
DateTime Encapsulates a datetime.
PagedList<T> An implementation of the IPagedList interface.
PagedList.Builder<T> The builder for creating an instance of IPagedList.
PaginationContext Represents an individual page's information of a paged list IPagedList.
PropertyServiceContext A concrete property service context object.
PropertyServiceContext.Builder A builder class to create an instance of IContext.
ResourceFactory A factory class to create and delete a namespace scoped property service entities.
ResourceFactory.Builder The builder for creating an instance of a ResourceFactory.
ServiceFactory A factory class to manage namespaces (INamespace) and property services (IPropertyService).

 

Enum Summary
OperationFailedException.Operation The Operation enum is used to indicate which persistence operation failed.
Type Represents a property value type.

 

Exception Summary
AlreadyExistsException The AlreadyExistsException is thrown from a property service to indicate that the property entity being created already exists in the system.
InvalidExpressionException Thrown when the string representation of an expression is invalid.
NotFoundException The NotFoundException is thrown from a property service to indicate that the property entity being managed could not be found in the system.
ObjectInUseException The ObjectInUseException is thrown from a property service to indicate that updating or deleting the specified property entity could not be done because the entity is currently referenced by other property entities in the system.
ObjectOutOfSyncException The ObjectOutOfSyncException is thrown from a property service to indicate that the specified property entity being managed is out of sync with the current version of that entity in the system.
OperationFailedException The OperationFailedException is thrown from a property service to indicate that a persistence operation has failed.
ParseException Thrown if unable to parse property value.
PropertyServiceException A base checked exception that is thrown from a property service to indicate that a problem occurred while accessing or managing property data.
ValidationFailedException Thrown when a property value is invalid.

 

Package oracle.wcps.property Description

Provides interfaces and classes to create property service entities such as namespaces, property definitions, propertyset definitions, and propertysets.

Please follow wcps services deployment guide for deploying property service.

How to create a Namespace, a PropertyDefinition, a PropertySetDefinition and PropertySets?

      IContext remoteContext =
               PropertyServiceContext.builder()
                       .withUri("http://localhost:7001/wcps/api/property")
                       .withUserName("username")
                       .withPassword("password")
                       .build();

       // Creating a Namespace
       INamespace companiesNamespace = Namespace.builder().withNamespaceName("CompaniesInUSA").build();
       ServiceFactory.createNamespace(remoteContext, companiesNamespace);

       // Retrieve the property service for the above namespace
       IPropertyService propertyService = ServiceFactory.getPropertyService(remoteContext, companiesNamespace.getName());

       // Creating a PropertyDefinition
       IPropertyDefinition stringDefinition =
               PropertyDefinition.builder(Type.STRING, false)
                       .withPropertyDefinitionName("String_Def")
                       .build();
       propertyService.createPropertyDefinition(remoteContext, stringDefinition);
 
       IPropertyDefinition integerDefinition =
               PropertyDefinition.builder(Type.INT, true)
                       .withPropertyDefinitionName("Integer_Def")
                       .withRestrictedValue(5000)
                       .withRestrictedValue(10000)
                       .withRestrictedValue(25000)
                       .withRestrictedValue(50000)
                       .withRestrictedValue(100000)
                       .withDefaultValue(5000)
                       .build();
       propertyService.createPropertyDefinition(remoteContext, integerDefinition);

       // Create a PropertySetDefinition
       IPropertySetDefinition propertySetDefinition =
               PropertySetDefinition.builder()
                       .withPropertySetDefinitionName("technology_companies_info")
                       .withPropertyMapping(
                               PropertyMapping.builder()
                                       .withPropertyName("CEOName")
                                       .withPropertyDefinitionName("String_Def")
                                       .build()
                       )
                       .withPropertyMapping(
                               PropertyMapping.builder()
                                       .withPropertyName("Address")
                                       .withPropertyDefinitionName("String_Def")
                                       .build()
                       )
                       .withPropertyMapping(
                               PropertyMapping.builder()
                                       .withPropertyName("Number_of_Employees")
                                       .withPropertyDefinitionName("Integer_Def")
                                       .build()
                       )
                       .build();

       propertyService.createPropertySetDefinition(remoteContext, propertySetDefinition);

       // Create few PropertySets
       IPropertySet oracle =
               PropertySet.builder()
                       .withPropertySetDefinitionName(propertySetDefinition.getName())
                       .withPropertySetName("Oracle")
                       .withProperty("CEOName", "Mr. Lawrence J. Ellison")
                       .withProperty("Address", "500 Oracle Parkway, Redwood Shores, CA 94065")
                       .withProperty("Number_of_Employees", 100000)
                       .build();

       IPropertySet apple =
               PropertySet.builder()
                       .withPropertySetDefinitionName(propertySetDefinition.getName())
                       .withPropertySetName("Apple")
                       .withProperty("CEOName", "Mr. Steven P. Jobs")
                       .withProperty("Address", "1 Infinite Loop, Cupertino, CA 95014")
                       .withProperty("Number_of_Employees", 25000)
                       .build();

       propertyService.createPropertySet(remoteContext, oracle);
       propertyService.createPropertySet(remoteContext, apple);

 
See Also:
IContext, PropertyServiceContext, IPropertyServiceFactory, IPropertyService

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.