org.writersforge.catalan.process.workers
Class WorkMetadata

java.lang.Object
  extended byorg.writersforge.catalan.process.workers.WorkMetadata
All Implemented Interfaces:
IWorkMetadata

public class WorkMetadata
extends java.lang.Object
implements IWorkMetadata

Wrapper around worker metadata.


Constructor Summary
WorkMetadata(java.lang.String name, java.lang.String description)
          Creates a new instance of WorkMetadata with no property metadata.
WorkMetadata(java.lang.String name, java.lang.String description, PropertyInfo[] required, OptionalPropertyInfo[] optional)
          Creates a new instance of WorkMetadata with property metadata.
 
Method Summary
 java.lang.String getDescription()
          Retrieves a description of the associated object.
 java.lang.String getName()
          Retrieves the name of the associated object.
 OptionalPropertyInfo[] getOptionalProperties()
          Retrieves metadata for all optional properties for th for the associated object.
 PropertyInfo[] getRequiredProperties()
          Retrieves metadata for all required properties for the associated object If no required properties exist, returns an empty array.
 void setDesc(java.lang.String desc)
          Assigns description metadata for the associated object.
 void setName(java.lang.String name)
          Assigns name metadata for the associated object.
 void setOptional(OptionalPropertyInfo[] optional)
          Assigns metadata for all optional properties for the associated object.
 void setRequired(PropertyInfo[] required)
          Assigns metadata for all required properties for the associated object .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkMetadata

public WorkMetadata(java.lang.String name,
                    java.lang.String description)
Creates a new instance of WorkMetadata with no property metadata.

Parameters:
name - object name
description - user-friendly object description

WorkMetadata

public WorkMetadata(java.lang.String name,
                    java.lang.String description,
                    PropertyInfo[] required,
                    OptionalPropertyInfo[] optional)
Creates a new instance of WorkMetadata with property metadata.

Parameters:
name - object name
description - user-friendly object description
required - property info for all required properties
optional - property info for all optional properties
Method Detail

getName

public final java.lang.String getName()
Retrieves the name of the associated object.

Specified by:
getName in interface IWorkMetadata
Returns:
object name metadata

setName

public final void setName(java.lang.String name)
Assigns name metadata for the associated object.

Parameters:
name - object description metadata

getDescription

public final java.lang.String getDescription()
Retrieves a description of the associated object.

Specified by:
getDescription in interface IWorkMetadata
Returns:
object description metadata

setDesc

public final void setDesc(java.lang.String desc)
Assigns description metadata for the associated object.

Parameters:
desc - object description metadata

getRequiredProperties

public final PropertyInfo[] getRequiredProperties()
Retrieves metadata for all required properties for the associated object If no required properties exist, returns an empty array.

Specified by:
getRequiredProperties in interface IWorkMetadata
Returns:
required property metadata

setRequired

public final void setRequired(PropertyInfo[] required)
Assigns metadata for all required properties for the associated object .

Parameters:
required - metadata for required properties

getOptionalProperties

public final OptionalPropertyInfo[] getOptionalProperties()
Retrieves metadata for all optional properties for th for the associated object. If no optional properties exist, returns an empty array.

Specified by:
getOptionalProperties in interface IWorkMetadata
Returns:
optional property metadata

setOptional

public final void setOptional(OptionalPropertyInfo[] optional)
Assigns metadata for all optional properties for the associated object.

Parameters:
optional - metadata for optional properties