Package com.ptc.core.meta.common
Interface IdentifierFactory
- All Known Implementing Classes:
DefaultIdentifierFactory,LogicalIdentifierFactory
public interface IdentifierFactory
This factory defines the pattern for constructing Identifiers. It will
process arbitrary lists of Identifiers -- doesn't matter if it's a TypeIdentifier,
AttributeIdentifier, etc.
A default implementation of the IdentifierFactory interface provides
a simple method for clients to construct Definition, Element, and Instance
Identifiers from external form. Methods with and without context (context
is for Attributes) are available, and both single and bulk mode transformations
are supported.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionFrom the identifier_external_form, we will construct an Identifier.Bulk mode of the get(String) method.get(String[] identifier_external_forms, Identifier identifier_context) Bulk mode of the get(String, TypeIdentifier) method.Bulk mode of the get(String, String) method.get(String identifier_external_form, Identifier identifier_context) Construct a DefinitionIdentifier based on the external form and the context(TypeIdentifier).Construct an Identifier based on the combined string from the external form and the context external form.newNamedInstanceIdentifier(String the_name, TypeInstanceIdentifier container)
Supported API: truenewPathInstanceIdentifier(String the_path, TypeInstanceIdentifier container)
Supported API: true
Supported API: truenewWCTypeIdentifier(String type_name)
Supported API: truenewWCTypeInstanceIdentifier(String type_name, int update_count, long object_id)
Supported API: truenewWCTypeInstanceIdentifier(String type_name, int update_count, long object_id, long branch_id)
Supported API: true
-
Method Details
-
get
From the identifier_external_form, we will construct an Identifier. If the external form represents a DefinitionIdentifier, a DefinitionIdentifier will be constructed. If the external form represents an ElementIdentifier, an ElementIdentifier will be constructed. If the external form only represents an InstanceIdentifier, an InstanceIdentifier will be constructed instead.
Supported API: true- Parameters:
identifier_external_form-- Returns:
- Identifier
- Throws:
IllegalFormatException
-
get
Identifier get(String identifier_external_form, String identifier_context_external_form) throws IllegalFormatException Construct an Identifier based on the combined string from the external form and the context external form. The only valid external form input are "DefinitionIdentifier, DefinitionIdentifier" or "ElementIdentifier, ElementIdentifier". Other inputs will cause IllegalFormatException.
Supported API: true- Parameters:
identifier_external_form-identifier_context_external_form-- Returns:
- Identifier
- Throws:
IllegalFormatException
-
get
Identifier get(String identifier_external_form, Identifier identifier_context) throws IllegalFormatException Construct a DefinitionIdentifier based on the external form and the context(TypeIdentifier). If the external form is not representing a DefinitionIdentifier, IllegalFormatException will be thrown.
Supported API: true- Parameters:
identifier_external_form-identifier_context-- Returns:
- Identifier
- Throws:
IllegalFormatException
-
get
Bulk mode of the get(String) method.
Supported API: true- Parameters:
identifier_external_forms-- Returns:
- Identifier[]
- Throws:
IllegalFormatException
-
get
Identifier[] get(String[] identifier_external_forms, String identifier_context_external_form) throws IllegalFormatException Bulk mode of the get(String, String) method.
Supported API: true- Parameters:
identifier_external_forms-identifier_context_external_form-- Returns:
- Identifier[]
- Throws:
IllegalFormatException
-
get
Identifier[] get(String[] identifier_external_forms, Identifier identifier_context) throws IllegalFormatException Bulk mode of the get(String, TypeIdentifier) method.
Supported API: true- Parameters:
identifier_external_forms-identifier_context-- Returns:
- Identifier[]
- Throws:
IllegalFormatException
-
newWCTypeIdentifier
Supported API: true- Parameters:
type_name-- Returns:
- TypeIdentifier
-
newWCTypeInstanceIdentifier
TypeInstanceIdentifier newWCTypeInstanceIdentifier(String type_name, int update_count, long object_id)
Supported API: true- Parameters:
type_name-update_count-object_id-- Returns:
- TypeInstanceIdentifier
-
newWCTypeInstanceIdentifier
TypeInstanceIdentifier newWCTypeInstanceIdentifier(String type_name, int update_count, long object_id, long branch_id)
Supported API: true- Parameters:
type_name-update_count-object_id-branch_id-- Returns:
- TypeInstanceIdentifier
-
newUninitializedInstanceIdentifier
Supported API: true- Parameters:
container-- Returns:
- InstanceIdentifier
-
newNamedInstanceIdentifier
Supported API: true- Parameters:
the_name-container-- Returns:
- InstanceIdentifier
-
newPathInstanceIdentifier
Supported API: true- Parameters:
the_path-container-- Returns:
- InstanceIdentifier
-