org.kuali.rice.kew.api.repository.type
Class KewTypeDefinition

java.lang.Object
  extended by org.kuali.rice.core.api.mo.AbstractDataTransferObject
      extended by org.kuali.rice.kew.api.repository.type.KewTypeDefinition
All Implemented Interfaces:
Serializable, Inactivatable, Identifiable, Versioned, ModelObjectBasic, ModelObjectComplete, KewTypeDefinitionContract

public final class KewTypeDefinition
extends AbstractDataTransferObject
implements KewTypeDefinitionContract

Concrete model object implementation of KEW KewType. immutable. Instances of KewType can be (un)marshalled to and from XML.

See Also:
KewTypeDefinitionContract, Serialized Form

Nested Class Summary
static class KewTypeDefinition.Builder
          This builder is used to construct instances of KEW KewType.
static class KewTypeDefinition.Elements
          A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
 
Method Summary
 KewAttributeDefinition getAttributeDefinitionByName(String name)
          Gets the KewTypeAttribute matching the name of it's KewAttribute.
 List<KewTypeAttribute> getAttributes()
          This method returns a list of attributes associated with the KewType
 String getId()
          The unique identifier for an object.
 String getName()
          This is the name for the KEWType
 String getNamespace()
          This is the namespace code.
 String getServiceName()
          This is the name of the KEW KewType service
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 
Methods inherited from class org.kuali.rice.core.api.mo.AbstractDataTransferObject
afterUnmarshal, beforeUnmarshal, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

getName

public String getName()
Description copied from interface: KewTypeDefinitionContract
This is the name for the KEWType

It is a name of a KEW type.

Specified by:
getName in interface KewTypeDefinitionContract
Returns:
name for KEW type.

getNamespace

public String getNamespace()
Description copied from interface: KewTypeDefinitionContract
This is the namespace code.

It provides scope of the KEW type.

Specified by:
getNamespace in interface KewTypeDefinitionContract
Returns:
the namespace code of the KEW type.

getServiceName

public String getServiceName()
Description copied from interface: KewTypeDefinitionContract
This is the name of the KEW KewType service

Specified by:
getServiceName in interface KewTypeDefinitionContract
Returns:
the service name of the KEW type

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

getAttributes

public List<KewTypeAttribute> getAttributes()
Description copied from interface: KewTypeDefinitionContract
This method returns a list of attributes associated with the KewType

Specified by:
getAttributes in interface KewTypeDefinitionContract
Returns:
a list of KewTypeAttribute objects.

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

getAttributeDefinitionByName

public KewAttributeDefinition getAttributeDefinitionByName(String name)
Gets the KewTypeAttribute matching the name of it's KewAttribute. If no attribute definition exists with that name then null is returned.

If multiple exist with the same name then the first match is returned. Since name is supposed to be unique this should not be a problem in practice.

Parameters:
name - the KewTypeAttribute's name
Returns:
the KewTypeAttribute or null
Throws:
IllegalArgumentException - if the name is blank


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.