Class DSFactory
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).
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
(TransformerData transformerData) Returns a copy of the specified TransformerData.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 TransformerPermission
createTransformerPermission
(String subject) static TransformerPermission
createTransformerPermission
(String subject, int flags) static TransformerRecord
createTransformerRecord
(TransformerRecord transformerRecord) Returns a copy of the specified TransformerRecord.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.
-
Method Details
-
createTransformerData
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()
.- Parameters:
subject
- The object name.objectType
- The object type (e.g. page, record, news).- Returns:
- A new TransformerData with the specified subject and object type. If the object type is a record, the returned object will be an instance of TransformerRecord.
- Throws:
NullPointerException
- If either the subject or objectType arguments are null.
-
createTransformerData
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
.- Parameters:
subject
- The object name.objectType
- The object type (e.g. page, record, news).flags
- The data source flags that should be applied.- Returns:
- A new TransformerData with the specified subject, object type and data source flags. If the object type is a record, the returned object will be an instance of TransformerRecord.
- Throws:
NullPointerException
- If either the subject or objectType arguments are null.
-
createTransformerData
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)
.- Parameters:
subject
- The object name.type
- The object type (e.g. page, record, news).- Returns:
- A new TransformerData with the specified subject and object type. If the object type is a record, the returned object will be an instance of TransformerRecord.
- Throws:
NullPointerException
- If the subject argument is null.
-
createTransformerData
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.
- Parameters:
subject
- The object name.type
- The object type (e.g. page, record, news).flags
- The data source flags that should be applied.- Returns:
- A new TransformerData with the specified subject, object type and data source flags. If the object type is a record, the returned object will be an instance of TransformerRecord.
- Throws:
NullPointerException
- If the subject argument is null.
-
createTransformerData
Returns a copy of the specified TransformerData.
- Parameters:
transformerData
- The TransformerData to be copied.- Returns:
- A copy of the specified TransformerData.
- Throws:
NullPointerException
- If the transformerData argument isnull
.
-
createTransformerRecord
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
.- Parameters:
subject
- The object name.- Returns:
- A new TransformerRecord with the specified subject.
- Throws:
NullPointerException
- If the subject argument is null.
-
createTransformerRecord
Creates a TransformerRecord for the specified subject and data source flags.
This is equivalent to calling
createTransformerData(subject, ObjectType.RECORD, flags
.- Parameters:
subject
- The object name.flags
- The data source flags that should be applied.- Returns:
- A new TransformerRecord with the specified subject and data source flags.
- Throws:
NullPointerException
- If the subject argument is null.
-
createTransformerRecord
Returns a copy of the specified TransformerRecord.
- Parameters:
transformerRecord
- The TransformerRecord to be copied.- Returns:
- A copy of the specified TransformerRecord.
- Throws:
NullPointerException
- If the transformerRecord argument isnull
.
-
createTransformerPermission
-
createTransformerPermission
-
createGlobalTransformerPermission
-
createGlobalTransformerPermission
-
createTransformerContainer
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.
- Parameters:
subject
- The object name.- Returns:
- A new TransformerContainer with the specified subject.
- Throws:
NullPointerException
- If the subject argument is null.
-
createTransformerContainer
Creates a TransformerContainer for the specified subject and data source flags.
This is equivalent to calling
createTransformerData(subject, ObjectType.CONTAINER, flags
.- Parameters:
subject
- The object name.flags
- The data source flags that should be applied.- Returns:
- A new TransformerContainer with the specified subject and data source flags.
- Throws:
NullPointerException
- If the subject argument is null.
-