org.eclipse.tigerstripe.workbench.model.deprecated_
Interface IAbstractArtifact

All Superinterfaces:
org.eclipse.tigerstripe.workbench.model.annotation.IAnnotationCapable, IModelComponent, IStereotypeCapable
All Known Subinterfaces:
IAssociationArtifact, IAssociationClassArtifact, IDatatypeArtifact, IDependencyArtifact, IEnumArtifact, IEventArtifact, IExceptionArtifact, IManagedEntityArtifact, IPackageArtifact, IPrimitiveTypeArtifact, IQueryArtifact, ISessionArtifact, IUpdateProcedureArtifact

public interface IAbstractArtifact
extends IModelComponent

Abstract Artifact for a Tigerstripe Model.

Author:
Eric Dillon

Nested Class Summary
static interface IAbstractArtifact.IFieldTypeRef
           
 
Nested classes/interfaces inherited from interface org.eclipse.tigerstripe.workbench.model.deprecated_.IModelComponent
IModelComponent.EMultiplicity, IModelComponent.EVisibility
 
Field Summary
static IAbstractArtifact[] EMPTY_ARRAY
           
 
Method Summary
 void addField(IField field)
          Add a single field to the fields for this Abstract Artifact.
 void addLiteral(ILiteral literal)
          Add a single literal to the literals for this Abstract Artifact.
 void addMethod(IMethod method)
          Add a single method to the methods for this Abstract Artifact.
 java.lang.String asText()
           
 void doSave(IProgressMonitor monitor)
           
 void doSilentSave(IProgressMonitor monitor)
           
 java.util.Collection<IAbstractArtifact> getAncestors()
          Returns the Ancestors of this class if defined.
 java.lang.String getArtifactPath()
           
 java.lang.String getArtifactType()
          Returns the type of this artifact.
 java.util.Collection<java.lang.Object> getChildren()
          Returns all children for this artifact Children are Fields, Methods, Literals, and potentially ends for IRelationships
 IAbstractArtifact getExtendedArtifact()
          Returns the IAbstractArtifact which this artifact extends.
 java.util.Collection<IAbstractArtifact> getExtendingArtifacts()
          Returns a collection of all the artifacts that directly extend this artifact.
 java.util.Collection<IField> getFields()
          Returns the fields defined for this artifact.
 java.util.Collection<IField> getFields(boolean filterFacetExcludedFields)
          Returns the fields defined for this artifact.
 IAbstractArtifact.IFieldTypeRef[] getFieldTypes()
          Returns an array of all the field types for this artifact.
 java.lang.String getFullyQualifiedName()
          Returns the fully qualified name (ie.
 java.util.Collection<IAbstractArtifact> getImplementedArtifacts()
          Returns a collection containing all the artifacts that are implemented by this artifact.
 java.lang.String getImplementedArtifactsAsStr()
          Returns a string containing a ';' separated list of FullyQualifiedNames of the artifacts that are implemented by this artifact.
 java.util.Collection<IAbstractArtifact> getImplementingArtifacts()
          Returns a collection containing all the artifacts that are implementing this.
 java.util.Collection<IField> getInheritedFields()
          Returns the inherited fields for this artifact.
 java.util.Collection<IField> getInheritedFields(boolean filterFacetExcludedFields)
          Returns the inherited fields for this artifact.
 java.util.Collection<ILiteral> getInheritedLiterals()
          Returns the inherited literals for this artifact.
 java.util.Collection<ILiteral> getInheritedLiterals(boolean filterFacetExcludedLiterals)
          Returns the inherited literals for this artifact.
 java.util.Collection<IMethod> getInheritedMethods()
          Returns the inherited methods for this artifact.
 java.util.Collection<IMethod> getInheritedMethods(boolean filterFacetExcludedMethods)
          Returns the inherited methods for this artifact.
 org.eclipse.tigerstripe.workbench.model.deprecated_.ossj.IStandardSpecifics getIStandardSpecifics()
          Returns the standard specific details for this artifact.
 java.util.Collection<ILiteral> getLiterals()
          Returns the literals defined for this artifact.
 java.util.Collection<ILiteral> getLiterals(boolean filterFacetExcludedLiterals)
          Returns the literals defined for this artifact.
 java.util.Collection<IMethod> getMethods()
          Returns the methods defined for this artifact.
 java.util.Collection<IMethod> getMethods(boolean filterFacetExcludedMethods)
          Returns the methods defined for this artifact.
 java.lang.String getPackage()
          Returns the package where this artifact is defined.
 org.eclipse.tigerstripe.workbench.internal.api.modules.IModuleHeader getParentModuleHeader()
           
 IProjectDescriptor getProjectDescriptor()
          Returns the details contained in the project that this artifact belongs to.
 java.util.Collection<IAbstractArtifact> getReferencedArtifacts()
          Returns a collection containing all the artifacts being referenced (through a reference or attribute) from this artifact.
 java.util.Collection<IAbstractArtifact> getReferencingArtifacts()
          Returns a collection with all the artifacts referencing this artifact.
 ITigerstripeModelProject getTigerstripeProject()
          Returns the Model project that contains this artifact.
 org.eclipse.tigerstripe.workbench.internal.api.model.artifacts.updater.IModelUpdater getUpdater()
          Figures out the updater to use to submit IModelChangeRequests regarding this artifact.
 boolean hasExtends()
          Returns true if this artifact extends another artifact.
 boolean isAbstract()
          Returns true if this Artifact is marked as abstract.
 boolean isReadonly()
          Returns true if this is a read-only artifact (i.e.
 IField makeField()
          Make a new blank artifact field.
 ILiteral makeLiteral()
          Make a new blank artifact literal.
 IMethod makeMethod()
          Make a new blank artifact method.
 void removeFields(java.util.Collection<IField> fields)
          Removes a number of fields from this Abstract Artifact.
 void removeLiterals(java.util.Collection<ILiteral> literals)
          Removes a number of literals from this Abstract Artifact.
 void removeMethods(java.util.Collection<IMethod> methods)
          Removes a number of methods from this Abstract Artifact.
 void setAbstract(boolean isAbstract)
          Sets the value of the isAbstract flag for this.
 void setExtendedArtifact(IAbstractArtifact artifact)
          Sets the IAbstractArtifact which this artifact extends.
 void setFields(java.util.Collection<IField> fields)
          Sets the fields for this Abstract Artifact.
 void setFullyQualifiedName(java.lang.String fqn)
          Sets the Fully Qualified Name of the Abstract Artifact.
 void setImplementedArtifacts(java.util.Collection<IAbstractArtifact> artifacts)
          Set the artifacts that are implemented by this artifact.
 void setLiterals(java.util.Collection<ILiteral> literals)
          Sets the literals for this Abstract Artifact.
 void setMethods(java.util.Collection<IMethod> methods)
          Sets the methods for this Abstract Artifact.
 void setPackage(java.lang.String packageName)
          Sets the package of the artifact.
 void write(java.io.Writer writer)
           
 
Methods inherited from interface org.eclipse.tigerstripe.workbench.model.deprecated_.IModelComponent
getComment, getContainedModelComponents, getContainingModelComponent, getLabel, getMetadata, getName, getProject, getVisibility, isInActiveFacet, setComment, setName, setVisibility, validate
 
Methods inherited from interface org.eclipse.tigerstripe.workbench.profile.stereotype.IStereotypeCapable
addStereotypeInstance, getStereotypeInstanceByName, getStereotypeInstances, getStereotypeString, hasStereotypeInstance, removeStereotypeInstance, removeStereotypeInstances
 
Methods inherited from interface org.eclipse.tigerstripe.workbench.model.annotation.IAnnotationCapable
getAnnotation, getAnnotations, getAnnotations, getAnnotations, hasAnnotations, hasAnnotations, hasAnnotations
 

Field Detail

EMPTY_ARRAY

static final IAbstractArtifact[] EMPTY_ARRAY
Method Detail

getArtifactType

java.lang.String getArtifactType()
Returns the type of this artifact. This will be the FQN of the class of the specific type of artifact: eg "org.eclipse.tigerstripe.api.external.model.artifacts.IEventArtifact"

Returns:
String - the fully qualified type of this artifact

isAbstract

boolean isAbstract()
Returns true if this Artifact is marked as abstract.

Returns:
true if the artifact is abstract, false otherwise

setAbstract

void setAbstract(boolean isAbstract)
Sets the value of the isAbstract flag for this.

Parameters:
isAbstract -

getFullyQualifiedName

java.lang.String getFullyQualifiedName()
Returns the fully qualified name (ie. package + name) of this artifact.

Returns:
String - fully qualified name of this artifact

setFullyQualifiedName

void setFullyQualifiedName(java.lang.String fqn)
Sets the Fully Qualified Name of the Abstract Artifact. This sets both the package and name. The format of the fqn should be the package name and the name, using '.' as the seperator.

Parameters:
fqn - - the FullyQualifiedName for this Artifact.

getPackage

java.lang.String getPackage()
Returns the package where this artifact is defined. If this artifact is defined in the default package, null is returned.

Returns:
String - the package where this artifact was defined.

setPackage

void setPackage(java.lang.String packageName)
Sets the package of the artifact. The parts of the package name should be separated using '.' as the seperator.

Parameters:
fqn - - the FullyQualifiedName for this Artifact.

getChildren

java.util.Collection<java.lang.Object> getChildren()
Returns all children for this artifact Children are Fields, Methods, Literals, and potentially ends for IRelationships


getFields

java.util.Collection<IField> getFields()
Returns the fields defined for this artifact. This will be limited to the fields defined locally in this artifact. If no field was defined return an empty collection. Note : Some artifact types do not support Fields and will always return an empty collection.

Returns:
Collection - an unmodifiable collection of all the fields for this artifact
See Also:
getInheritedIFields()

getFields

java.util.Collection<IField> getFields(boolean filterFacetExcludedFields)
Returns the fields defined for this artifact. This will be limited to the fields defined locally in this artifact. If no field was defined return an empty collection. Note : Some artifact types do not support Fields and will always return an empty collection.

Parameters:
filterFacetExcludedFields - - if set to true, all fields that are excluded by the active facet will be filtered out. If no facet is active, all fields are returned.
Returns:
Collection - an unmodifiable collection of all the fields for this artifact
See Also:
getInheritedIFields()

getInheritedFields

java.util.Collection<IField> getInheritedFields()
Returns the inherited fields for this artifact. Only inherited fields will be included, but all inherited fields (ie from all ancestors) will be included. If no field was inherited return an empty collection. This is equivalent to getInheritedIFields(false) Note : Some artifact types do not support Fields and will always return an empty array. return Collection - an unmodifiable collection of all the inherited fields for this artifact


getInheritedFields

java.util.Collection<IField> getInheritedFields(boolean filterFacetExcludedFields)
Returns the inherited fields for this artifact. Only inherited fields will be included, but all inherited fields (ie from all ancestors) will be included. If no field was inherited return an empty collection. Note : Some artifact types do not support Fields and will always return an empty collection.

Parameters:
filterFacetExcludedFields - - if set to true, all fields that are excluded by the active facet will be filtered out. If no facet is active, all fields are returned. return Collection - an unmodifiable collection of all the inherited fields for this artifact

makeField

IField makeField()
Make a new blank artifact field. This does not add the field to the Abstract Artifact.

Returns:
a new IField.

setFields

void setFields(java.util.Collection<IField> fields)
Sets the fields for this Abstract Artifact.

Parameters:
fields -
Throws:
java.lang.IllegalArgumentException

addField

void addField(IField field)
Add a single field to the fields for this Abstract Artifact.

Parameters:
field - to add.

removeFields

void removeFields(java.util.Collection<IField> fields)
Removes a number of fields from this Abstract Artifact.

Parameters:
fields - to be removed.

getLiterals

java.util.Collection<ILiteral> getLiterals()
Returns the literals defined for this artifact. This will be limited to the literals defined locally in this artifact. If no literal was defined return an empty collection. Note : Some artifact types do not support literals and will always return an empty collection.

Returns:
Collection - an unmodifiable collection of all the literals for this artifact
See Also:
getInheritedLietrals()

getLiterals

java.util.Collection<ILiteral> getLiterals(boolean filterFacetExcludedLiterals)
Returns the literals defined for this artifact. This will be limited to the literals defined locally in this artifact. If no literal was defined return an empty collection. Note : Some artifact types do not support literals and will always return an empty collection.

Parameters:
filterFacetExcludedliterals - - if set to true, all literals that are excluded by the active facet will be filtered out. If no facet is active, all literals are returned.
Returns:
Collection - an unmodifiable collection of all the literals for this artifact
See Also:
getInheritedLietrals()

getInheritedLiterals

java.util.Collection<ILiteral> getInheritedLiterals()
Returns the inherited literals for this artifact. Only inherited literals will be included, but all inherited literals (ie from all ancestors) will be included. If no literals was inherited return an empty collection. this is equivalent to getInheritedLiterals(false) Note : Some artifact types do not support literals and will always return an empty collection.

Returns:
Collection - an unmodifiable collection of all the inherited literals for this artifact

getInheritedLiterals

java.util.Collection<ILiteral> getInheritedLiterals(boolean filterFacetExcludedLiterals)
Returns the inherited literals for this artifact. Only inherited literals will be included, but all inherited literals (ie from all ancestors) will be included. If no literals was inherited return an empty collection. Note : Some artifact types do not support literals and will always return an empty collection.

Parameters:
filterFacetExcludedLiterals - - if set to true, all literals that are excluded by the active facet will be filtered out. If no facet is active, all literals are returned.
Returns:
Collection - an unmodifiable collection of all the inherited literals for this artifact

makeLiteral

ILiteral makeLiteral()
Make a new blank artifact literal. This does not add the literal to the Abstract Artifact.

Returns:
a new ILiteral

setLiterals

void setLiterals(java.util.Collection<ILiteral> literals)
Sets the literals for this Abstract Artifact.

Parameters:
literals -
Throws:
java.lang.IllegalArgumentException

addLiteral

void addLiteral(ILiteral literal)
Add a single literal to the literals for this Abstract Artifact.

Parameters:
literal - to add.

removeLiterals

void removeLiterals(java.util.Collection<ILiteral> literals)
Removes a number of literals from this Abstract Artifact.

Parameters:
literals - to be removed.

getMethods

java.util.Collection<IMethod> getMethods()
Returns the methods defined for this artifact. This will be limited to the methods defined locally in this artifact. If no method was defined return an empty collection. Note : Some artifact types do not support Methods and will always return an empty collection.

Returns:
Collection - an unmodifiable collection of all the methods for this artifact
See Also:
getInheritedIMethods()

getMethods

java.util.Collection<IMethod> getMethods(boolean filterFacetExcludedMethods)
Returns the methods defined for this artifact. This will be limited to the methods defined locally in this artifact. If no method was defined return an empty collection. Note : Some artifact types do not support Methods and will always return an empty collection.

Parameters:
filterFacetExcludedMethods - - if set to true, all methods that are excluded by the active facet will be filtered out. If no facet is active, all methods are returned.
Returns:
Collection - an unmodifiable collection of all the methods for this artifact
See Also:
getInheritedIMethods()

getInheritedMethods

java.util.Collection<IMethod> getInheritedMethods()
Returns the inherited methods for this artifact. Only inherited methods will be included, but all inherited methods (ie from all ancestors) will be included. If no method was inherited return an empty collection. This is equivalent to getInheritedIMethods(false) Note : Some artifact types do not support Methods and will always return an empty collection.

Returns:
Collection - an unmodifiable collection of all the inherited methods for this artifact

getInheritedMethods

java.util.Collection<IMethod> getInheritedMethods(boolean filterFacetExcludedMethods)
Returns the inherited methods for this artifact. Only inherited methods will be included, but all inherited methods (ie from all ancestors) will be included. If no method was inherited return an empty collection. Note : Some artifact types do not support Methods and will always return an empty collection.

Parameters:
filterFacetExcludedMethods - - if set to true, all methods that are excluded by the active facet will be filtered out. If no facet is active, all methods are returned.
Returns:
Collection - an unmodifiable collection of all the inherited methods for this artifact

makeMethod

IMethod makeMethod()
Make a new blank artifact method. This does not add the method to the Abstract Artifact.

Returns:
a new IMethod

setMethods

void setMethods(java.util.Collection<IMethod> methods)
Sets the methods for this Abstract Artifact.

Parameters:
methods -
Throws:
java.lang.IllegalArgumentException

addMethod

void addMethod(IMethod method)
Add a single method to the methods for this Abstract Artifact.

Parameters:
method - to add.

removeMethods

void removeMethods(java.util.Collection<IMethod> methods)
Removes a number of methods from this Abstract Artifact.

Parameters:
methods - to be removed.

getExtendedArtifact

IAbstractArtifact getExtendedArtifact()
Returns the IAbstractArtifact which this artifact extends. If there is no extends clause, null is returned.

Returns:
IAbstractArtifact - the extended artifact

hasExtends

boolean hasExtends()
Returns true if this artifact extends another artifact.

Returns:
true if this artifacts extends another artifact, false otherwise.

setExtendedArtifact

void setExtendedArtifact(IAbstractArtifact artifact)
Sets the IAbstractArtifact which this artifact extends.

Parameters:
artifact -

getAncestors

java.util.Collection<IAbstractArtifact> getAncestors()
Returns the Ancestors of this class if defined. If no ancestor was defined return an empty collection.

Returns:
Collection - an unmodifiable collection of all ancestors to this artifact

getExtendingArtifacts

java.util.Collection<IAbstractArtifact> getExtendingArtifacts()
Returns a collection of all the artifacts that directly extend this artifact.

Returns:
Collection - artifacts that directly extend this artifact

getImplementedArtifacts

java.util.Collection<IAbstractArtifact> getImplementedArtifacts()
Returns a collection containing all the artifacts that are implemented by this artifact.

Returns:
Collection - artifacts that are implemented by this artifact

getImplementedArtifactsAsStr

java.lang.String getImplementedArtifactsAsStr()
Returns a string containing a ';' separated list of FullyQualifiedNames of the artifacts that are implemented by this artifact.

Returns:
- ';' separated list of fqns of implemented artifacts

getImplementingArtifacts

java.util.Collection<IAbstractArtifact> getImplementingArtifacts()
Returns a collection containing all the artifacts that are implementing this. NOTE: this method is not implemented yet and returns an empty collection.

Returns:
Not implemented - returns an empty collection

setImplementedArtifacts

void setImplementedArtifacts(java.util.Collection<IAbstractArtifact> artifacts)
Set the artifacts that are implemented by this artifact.

Parameters:
artifacts - that are implemented by this artifact

getReferencedArtifacts

java.util.Collection<IAbstractArtifact> getReferencedArtifacts()
Returns a collection containing all the artifacts being referenced (through a reference or attribute) from this artifact.

Returns:

getReferencingArtifacts

java.util.Collection<IAbstractArtifact> getReferencingArtifacts()
Returns a collection with all the artifacts referencing this artifact. NOTE: this is currently not implemented and will always return an empty collection.

Returns:
Empty collection

getProjectDescriptor

IProjectDescriptor getProjectDescriptor()
Returns the details contained in the project that this artifact belongs to. NOTE: this is always populated, as opposed to #ITigerstripeProject() which returns null for artifacts contained in Modules.

Returns:
- project descriptor for the containing project

getTigerstripeProject

ITigerstripeModelProject getTigerstripeProject()
Returns the Model project that contains this artifact. This will be null for artifacts contained in modules.

Returns:
- the containing project
See Also:
getProjectDescriptor()

isReadonly

boolean isReadonly()
Returns true if this is a read-only artifact (i.e. it lives in a TS module where artifact cannot be changed) Please note that this boolean is set when the artifact is added to an artifact manager. Only when a module is being loaded up in memory will this flag be set to true. In other words, any manually created artifact will always return true.

Returns:
true if this is readonly.

getArtifactPath

java.lang.String getArtifactPath()
                                 throws TigerstripeException
Throws:
TigerstripeException

doSave

void doSave(IProgressMonitor monitor)
            throws TigerstripeException
Throws:
TigerstripeException

doSilentSave

void doSilentSave(IProgressMonitor monitor)
                  throws TigerstripeException
Throws:
TigerstripeException

write

void write(java.io.Writer writer)
           throws TigerstripeException
Throws:
TigerstripeException

asText

java.lang.String asText()
                        throws TigerstripeException
Throws:
TigerstripeException

getUpdater

org.eclipse.tigerstripe.workbench.internal.api.model.artifacts.updater.IModelUpdater getUpdater()
                                                                                                throws TigerstripeException
Figures out the updater to use to submit IModelChangeRequests regarding this artifact.

Returns:
Throws:
TigerstripeException

getFieldTypes

IAbstractArtifact.IFieldTypeRef[] getFieldTypes()
Returns an array of all the field types for this artifact.

Returns:

getIStandardSpecifics

org.eclipse.tigerstripe.workbench.model.deprecated_.ossj.IStandardSpecifics getIStandardSpecifics()
Returns the standard specific details for this artifact.

Returns:

getParentModuleHeader

org.eclipse.tigerstripe.workbench.internal.api.modules.IModuleHeader getParentModuleHeader()