Class ObjectType
- java.lang.Object
-
- com.caplin.transformer.module.ObjectType
-
public class ObjectType extends java.lang.Object
This class defines all the types of objects that are supported by the Transformer. It contains static instances of the available object types, which can be used to subscribe to data (see
Subscriber.addSubscriptionListener
), check an updated object's type (seeTransformerData.getObjectType
) and create a new object (seeDSFactory.createTransformerData
).The available object types are:
- Page
- Record
- News
- Story
- Type 2 record
- Type 3 record
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectType
CONTAINER
A container object.static ObjectType
GENERIC
The object does not exist in the Transformer cache.static ObjectType
NEWS
A news headline object.static ObjectType
PAGE
A page object.static ObjectType
PERMISSION
A permission object.static ObjectType
RECORD
A record object.static ObjectType
RECORD_TYPE2
A type 2 record object.static ObjectType
RECORD_TYPE3
A type 3 record object.static ObjectType
STORY
A news story object.static ObjectType
UNDEFINED
The object does not exist in the Transformer cache.static ObjectType
UNKNOWN
The object exists but Transformer does not know what type it is yet.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
int
getCode()
Gets the code that represents the object's type.java.lang.String
getDescription()
Gets the description of the object's type.static ObjectType
getObjectType(int typeCode)
Gets the ObjectType that represents the specified code.int
hashCode()
java.lang.String
toString()
Returns a string that describes the ObjectType, including its description and code.
-
-
-
Field Detail
-
PAGE
public static final ObjectType PAGE
A page object.
-
RECORD
public static final ObjectType RECORD
A record object.
-
NEWS
public static final ObjectType NEWS
A news headline object.
-
STORY
public static final ObjectType STORY
A news story object.
-
RECORD_TYPE2
public static final ObjectType RECORD_TYPE2
A type 2 record object.
-
RECORD_TYPE3
public static final ObjectType RECORD_TYPE3
A type 3 record object.
-
CONTAINER
public static final ObjectType CONTAINER
A container object.
-
PERMISSION
public static final ObjectType PERMISSION
A permission object.
-
UNKNOWN
public static final ObjectType UNKNOWN
The object exists but Transformer does not know what type it is yet.
-
GENERIC
public static final ObjectType GENERIC
The object does not exist in the Transformer cache.
-
UNDEFINED
public static final ObjectType UNDEFINED
The object does not exist in the Transformer cache.
-
-
Method Detail
-
getObjectType
public static ObjectType getObjectType(int typeCode)
Gets the ObjectType that represents the specified code.
The valid codes are:
- 221 -
PAGE
- 222 -
RECORD
- 223 -
NEWS
- 224 -
STORY
- 225 -
RECORD_TYPE2
- 226 -
RECORD_TYPE3
- 228 -
CONTAINER
- 230 -
PERMISSION
- 200 -
UNKNOWN
- -1 -
UNDEFINED
- Parameters:
typeCode
- The code used to describe an object type.- Returns:
- The ObjectType that corresponds to the specified code. If the code does not match any of the available ObjectTypes, then null is returned.
- 221 -
-
getCode
public int getCode()
Gets the code that represents the object's type.
- Returns:
- The object's code.
-
getDescription
public java.lang.String getDescription()
Gets the description of the object's type.
- Returns:
- The object's description.
-
toString
public java.lang.String toString()
Returns a string that describes the ObjectType, including its description and code.
- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string that represents the ObjectType.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-