Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.content.adapter
Class ObjectClassOpsImpl

    java.lang.Object
      com.bea.p13n.content.adapter.BaseOps
          com.bea.p13n.content.adapter.ObjectClassOpsImpl

All Implemented Interfaces:
  ObjectClassOps, Serializable

public class ObjectClassOpsImpl
extends BaseOps
implements ObjectClassOps

The object class ops for the WLP Content Repository-to-ContentManager adapter.

The uid of IDs of ObjectClasses from this will be the PropertySet name.

The uid of IDs of PropertyDefinition's from this will be the propertysetname/property name.

All adapter to DocumentManager ObjectClasses will have a primary content property called 'content' which refers to the result of calling getContentBlock() on the DocumentManager.

See Also:
  Serialized Form

Field Summary

Fields inherited from class com.bea.p13n.content.adapter.BaseOps
`CONTENT_MANAGER_HOME, credentials, PATH_IS_ID, PATH_STARTS_WITH_SLASH, pathIsId, pathStartsWithSlash, properties`

Constructor Summary
`ObjectClassOpsImpl(Credentials credentials, Properties properties)`

Method Summary
`ObjectClass` | `convert(String reponame, PropertySet ps)` Convert a PropertySet to an ObjectClass.
`static PropertyDefinition` | `convert(String reponame, String psName, String propname, PropertyDefinition pdef)` Convert a PropertySet PropertyDefinition to an ObjectClass PropertyDefinition.
`PropertyDefinition` | `createContentPropertyDefinition(String reponame, String psName)` Create the PropertyDefinition for the magic "content" property for DocumentManagers.
`ObjectClass` | `createObjectClass(ObjectClass objectClass)` Creates the given ObjectClass.
`static PropertyChoice` | `createPropertyChoice(ID id, int type, Object val)` Create a property choice from the given value.
`PropertyDefinition` | `createPropertyDefinition(ID objectClassId, PropertyDefinition propertyDefinition)` Adds the given propertyDefinition to the ObjectClass with the given objectClassId.
`ObjectClass` | `createStandardObjectClass(String reponame)` Create an ObjectClass for the "Standard" adapter properties.
`void` | `deleteObjectClass(ID objectClassId)` Deletes the ObjectClass with the given objectClassId.
`void` | `deletePropertyDefinition(ID propertyDefinitionId)` Deletes the given propertyDefinition.
`ObjectClass` | `getObjectClass(ID objectClassId)` Gets the ObjectClass with the given objectClassId.
`ObjectClass[]` | `getObjectClasses()` Gets all of the ObjectClasses available in the content repository.
`InputStream` | `getPropertyChoiceBytes(ID propertyChoiceId)` Gets the bytes for the given PropertyChoice.
`PropertyDefinition` | `getPropertyDefinition(ID propertyDefinitionId)` Gets the PropertyDefinition for the given id.
`PropertyDefinition[]` | `getPropertyDefinitions(ID objectClassId)` Gets all PropertyDefinitions for the given ObjectClass.
`PropertyDefinition[]` | `getPropertyDefinitions(String reponame, PropertySet ps)` Get the property definitions for a property set.
`PropertyDefinition[]` | `getStandardPropertyDefinitions(String reponame)` Create the PropertyDefinitions for the "Standard" adapter properties.
`ObjectClass` | `renameObjectClass(ID id, String newName)` Renames the given ObjectClass.
`PropertyDefinition` | `updatePropertyDefinition(PropertyDefinition propertyDefinition)` Updates the given propertyDefinition.

Methods inherited from class com.bea.p13n.content.adapter.BaseOps
`getContentManager, unsupported`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ObjectClassOpsImpl

    public ObjectClassOpsImpl(Credentials credentials,
                              Properties properties)

Method Detail

### convert

    public ObjectClass convert(String reponame,
                               PropertySet ps)

  Convert a PropertySet to an ObjectClass.

### convert

    public static PropertyDefinition convert(String reponame,
                                             String psName,
                                             String propname,
                                             PropertyDefinition pdef)

  Convert a PropertySet PropertyDefinition to an ObjectClass PropertyDefinition.

### createContentPropertyDefinition

    public PropertyDefinition createContentPropertyDefinition(String reponame,
                                                              String psName)

  Create the PropertyDefinition for the magic "content" property for DocumentManagers.

### createObjectClass

    public ObjectClass createObjectClass(ObjectClass objectClass)
                                  throws RepositoryException

  Creates the given ObjectClass.

  Specified by:
    `createObjectClass` in interface `ObjectClassOps`
  Parameters:
    `objectClass` - - the ObjectClass to create, along with any PropertyDefinitions to create also.
  Returns:
    ObjectClass - the new ObjectClass.
  Throws:
    `RepositoryException` - - if a system error occurs.

### createPropertyChoice

    public static PropertyChoice createPropertyChoice(ID id,
                                                      int type,
                                                      Object val)

  Create a property choice from the given value.

  Parameters:
    `id` - the property choice id
    `type` - the Property type constant
    `val` - the value (non-null) from the old PropertySet PropertyDefinition.
  Returns:
    the PropertyChoice - null if invalid val for type

### createPropertyDefinition

    public PropertyDefinition createPropertyDefinition(ID objectClassId,
                                                       PropertyDefinition propertyDefinition)

  Adds the given propertyDefinition to the ObjectClass with the given objectClassId.

  Specified by:
    `createPropertyDefinition` in interface `ObjectClassOps`
  Parameters:
    `objectClassId` - - the id of the ObjectClass to add the PropertyDefinition to.
    `propertyDefinition` - - the propertyDefinition to create and add to the ObjectClass.
  Returns:
    PropertyDefinition - the PropertyDefinition that was added to the ObjectClass.

### createStandardObjectClass

    public ObjectClass createStandardObjectClass(String reponame)

  Create an ObjectClass for the "Standard" adapter properties.

### deleteObjectClass

    public void deleteObjectClass(ID objectClassId)

  Deletes the ObjectClass with the given objectClassId. All of the ObjectClass PropertyDefinitions, their PropertyChocies are also deleted if present.

  Specified by:
    `deleteObjectClass` in interface `ObjectClassOps`
  Parameters:
    `objectClassId` - - the ID of the ObjectClass to delete.

### deletePropertyDefinition

    public void deletePropertyDefinition(ID propertyDefinitionId)

  Deletes the given propertyDefinition.

  Specified by:
    `deletePropertyDefinition` in interface `ObjectClassOps`
  Parameters:
    `propertyDefinitionId` - - the ID of the propertyDefinition to delete.

### getObjectClass

    public ObjectClass getObjectClass(ID objectClassId)
                               throws NoSuchObjectClassException

  Gets the ObjectClass with the given objectClassId.

  Specified by:
    `getObjectClass` in interface `ObjectClassOps`
  Parameters:
    `objectClassId` - - the ID of the ObjectClass to get.
  Returns:
    ObjectClass - the ObjectClass for the id passed in.
  Throws:
    `NoSuchObjectClassException` - - if the ObjectClass to get does not exist.

### getObjectClasses

    public ObjectClass[] getObjectClasses()

  Gets all of the ObjectClasses available in the content repository.

  Specified by:
    `getObjectClasses` in interface `ObjectClassOps`
  Returns:
    ObjectClass[] - an array of all ObjectClasses, an empty array if none are currently defined.

### getPropertyChoiceBytes

    public InputStream getPropertyChoiceBytes(ID propertyChoiceId)

  Gets the bytes for the given PropertyChoice.

  Specified by:
    `getPropertyChoiceBytes` in interface `ObjectClassOps`
  Parameters:
    `propertyChoiceId` - - the ID of the propertyChoice to get the bytes for.
  Returns:
    InputStream - the bytes for the PropertyChoice.

### getPropertyDefinition

    public PropertyDefinition getPropertyDefinition(ID propertyDefinitionId)
                                             throws NoSuchPropertyDefinitionException

  Description copied from interface: `ObjectClassOps`
  Gets the PropertyDefinition for the given id.

  Specified by:
    `getPropertyDefinition` in interface `ObjectClassOps`
  Parameters:
    `propertyDefinitionId` - - the ID the PropertyDefinition to get.
  Returns:
    PropertyDefinition - the PropertyDefinition whose id matches propertyDefinitionId.
  Throws:
    `NoSuchPropertyDefinitionException` - - if the PropertyDefinition does not exist.

### getPropertyDefinitions

    public PropertyDefinition[] getPropertyDefinitions(ID objectClassId)
                                                throws NoSuchObjectClassException

  Gets all PropertyDefinitions for the given ObjectClass.

  Specified by:
    `getPropertyDefinitions` in interface `ObjectClassOps`
  Parameters:
    `objectClassId` - - the ID for the ObjectClass to get its PropertyDefinitions.
  Returns:
    PropertyDefinition[] - the array of PropertyDefinitions for the given ObjectClass - of an empty array of none are currently defined.
  Throws:
    `NoSuchObjectClassException` - - if the ObjectClass does not exist.

### getPropertyDefinitions

    public PropertyDefinition[] getPropertyDefinitions(String reponame,
                                                       PropertySet ps)

  Get the property definitions for a property set.

### getStandardPropertyDefinitions

    public PropertyDefinition[] getStandardPropertyDefinitions(String reponame)

  Create the PropertyDefinitions for the "Standard" adapter properties.

### renameObjectClass

    public ObjectClass renameObjectClass(ID id,
                                         String newName)
                                  throws RepositoryException

  Renames the given ObjectClass.

  Specified by:
    `renameObjectClass` in interface `ObjectClassOps`
  Parameters:
    `id` - - the ID of the objectClass to rename.
    `newName` - - the new name of the ObjectClass.
  Returns:
    ObjectClass - the updated ObjectClass.
  Throws:
    `RepositoryException` - - if a system error occurs.

### updatePropertyDefinition

    public PropertyDefinition updatePropertyDefinition(PropertyDefinition propertyDefinition)

  Updates the given propertyDefinition.

  Specified by:
    `updatePropertyDefinition` in interface `ObjectClassOps`
  Parameters:
    `propertyDefinition` - - the propertyDefinition to update.
  Returns:
    PropertyDefinition - the updated PropertyDefinition.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved