public class DSFactory extends Object
Factory for a TransformerData, or one of its subclasses.
This class contains static methods for creating new TransformerDatas with specified subjects, object types, and, optionally, data source flags.
The possible data source flags that can be set are:
DSData.F_CREATEOBJECT
DSData.F_CREATEPARENT
DSData.F_IMAGE
DSData.F_FILTER_TYPE2
DSData.F_FILTER_TYPE3
These flags should be ORed together to set multiple flags (e.g. DSData.F_CREATEOBJECT|DSData.F_CREATEPARENT|DSData.F_IMAGE).
Modifier and Type | Method and Description |
---|---|
static TransformerPermission |
createGlobalTransformerPermission(String subject) |
static TransformerPermission |
createGlobalTransformerPermission(String subject,
int flags) |
static TransformerContainer |
createTransformerContainer(String subject)
Creates a TransformerContainer for the specified subject.
|
static TransformerContainer |
createTransformerContainer(String subject,
int flags)
Creates a TransformerContainer for the specified subject and data
source flags.
|
static TransformerData |
createTransformerData(String subject,
int type)
Creates a TransformerData for the specified subject and object
type.
|
static TransformerData |
createTransformerData(String subject,
int type,
int flags)
Creates a TransformerData for the specified subject, object
type and data source flags.
|
static TransformerData |
createTransformerData(String subject,
ObjectType objectType)
Creates a TransformerData for the specified subject and object
type.
|
static TransformerData |
createTransformerData(String subject,
ObjectType objectType,
int flags)
Creates a TransformerData for the specified subject, object
type and data source flags.
|
static TransformerData |
createTransformerData(TransformerData transformerData)
Returns a copy of the specified TransformerData.
|
static TransformerPermission |
createTransformerPermission(String subject) |
static TransformerPermission |
createTransformerPermission(String subject,
int flags) |
static TransformerRecord |
createTransformerRecord(String subject)
Creates a TransformerRecord for the specified subject.
|
static TransformerRecord |
createTransformerRecord(String subject,
int flags)
Creates a TransformerRecord for the specified subject and data
source flags.
|
static TransformerRecord |
createTransformerRecord(TransformerRecord transformerRecord)
Returns a copy of the specified TransformerRecord.
|
public static TransformerData createTransformerData(String subject, ObjectType objectType)
Creates a TransformerData for the specified subject and object type. The data source flags will default to F_CREATEOBJECT and F_CREATEPARENT.
This is equivalent to calling createTransformerData(subject, objectType.getCode()
.
subject
- The object name.objectType
- The object type (e.g. page, record, news).NullPointerException
- If either the subject or objectType
arguments are null.public static TransformerData createTransformerData(String subject, ObjectType objectType, int flags)
Creates a TransformerData for the specified subject, object type and data source flags.
This is equivalent to calling createTransformerData(subject, objectType.getCode(), flags
.
subject
- The object name.objectType
- The object type (e.g. page, record, news).flags
- The data source flags that should be applied.NullPointerException
- If either the subject or objectType
arguments are null.public static TransformerData createTransformerData(String subject, int type)
Creates a TransformerData for the specified subject and object type. The data source flags will default to F_CREATEOBJECT and F_CREATEPARENT.
This is equivalent to calling createTransformerData(subject, type, TransformerData.F_CREATEOBJECT|TransformerData.F_CREATEPARENT)
.
subject
- The object name.type
- The object type (e.g. page, record, news).NullPointerException
- If the subject argument is null.public static TransformerData createTransformerData(String subject, int type, int flags)
Creates a TransformerData for the specified subject, object type and data source flags.
If the object type is a record, the actual object that will be created will be a TransformerRecord.
subject
- The object name.type
- The object type (e.g. page, record, news).flags
- The data source flags that should be applied.NullPointerException
- If the subject argument is null.public static TransformerData createTransformerData(TransformerData transformerData)
Returns a copy of the specified TransformerData.
transformerData
- The TransformerData to be copied.NullPointerException
- If the transformerData argument is null
.public static TransformerRecord createTransformerRecord(String subject)
Creates a TransformerRecord for the specified subject. The data source flags will default to F_CREATEOBJECT and F_CREATEPARENT.
This is equivalent to calling createTransformerData(subject, ObjectType.RECORD
.
subject
- The object name.NullPointerException
- If the subject argument is null.public static TransformerRecord createTransformerRecord(String subject, int flags)
Creates a TransformerRecord for the specified subject and data source flags.
This is equivalent to calling createTransformerData(subject, ObjectType.RECORD, flags
.
subject
- The object name.flags
- The data source flags that should be applied.NullPointerException
- If the subject argument is null.public static TransformerRecord createTransformerRecord(TransformerRecord transformerRecord)
Returns a copy of the specified TransformerRecord.
transformerRecord
- The TransformerRecord to be copied.NullPointerException
- If the transformerRecord argument is null
.public static TransformerPermission createTransformerPermission(String subject)
public static TransformerPermission createTransformerPermission(String subject, int flags)
public static TransformerPermission createGlobalTransformerPermission(String subject)
public static TransformerPermission createGlobalTransformerPermission(String subject, int flags)
public static TransformerContainer createTransformerContainer(String subject)
Creates a TransformerContainer for the specified subject. The data source flags will default to F_CREATEOBJECT and F_CREATEPARENT.
This is equivalent to calling createTransformerData(subject, ObjectType.CONTAINER.
subject
- The object name.NullPointerException
- If the subject argument is null.public static TransformerContainer createTransformerContainer(String subject, int flags)
Creates a TransformerContainer for the specified subject and data source flags.
This is equivalent to calling createTransformerData(subject, ObjectType.CONTAINER, flags
.
subject
- The object name.flags
- The data source flags that should be applied.NullPointerException
- If the subject argument is null.Please send bug reports and comments to Caplin support