org.eclipse.tigerstripe.model.artifacts
Interface IAbstractArtifact

All Superinterfaces:
IModelComponent, IStereotypeCapable
All Known Subinterfaces:
IAssociationArtifact, IAssociationClassArtifact, IDatatypeArtifact, IDependencyArtifact, IEnumArtifact, IEventArtifact, IExceptionArtifact, IManagedEntityArtifact, 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
           
 
Field Summary
 
Fields inherited from interface org.eclipse.tigerstripe.model.IModelComponent
VISIBILITY_PACKAGE, VISIBILITY_PRIVATE, VISIBILITY_PROTECTED, VISIBILITY_PUBLIC
 
Method Summary
 void addIField(IField field)
           
 void addILabel(ILabel label)
           
 void addIMethod(IMethod method)
           
 java.lang.String asText()
           
 void doSave(org.eclipse.tigerstripe.internal.api.utils.ITigerstripeProgressMonitor monitor)
           
 void doSilentSave(org.eclipse.tigerstripe.internal.api.utils.ITigerstripeProgressMonitor monitor)
           
 IAbstractArtifact[] getAncestors()
          Returns the Ancestors of this class if defined.
 java.lang.String getArtifactPath()
           
 java.lang.String getArtifactType()
           
 java.lang.Object[] getChildren()
          Returns all children for this artifact Children are Fields, Methods, Literals, and potentially ends for IRelationships
 IAbstractArtifact getExtendedIArtifact()
          Returns the IArtifact which this artifact extends.
 IAbstractArtifact[] getExtendingArtifacts()
          Returns an array of all the artifacts that extends this directly.
 IAbstractArtifact[] getExtendingIArtifacts()
          Returns the list of artifacts that are extending "this" artifact.
 IAbstractArtifact.IFieldTypeRef[] getFieldITypes()
          Returns an array of all the field types for this artifact.
 java.lang.String getFullyQualifiedName()
          Returns the fully qualified name (ie.
 java.lang.String getIArtifactType()
          Returns the type of this artifact.
 IField[] getIFields()
          Returns the fields defined for this artifact
 IField[] getIFields(boolean filterFacetExcludedFields)
          Returns the fields defined for this artifact.
 ILabel[] getILabels()
          Returns the labels defined for this artifact
 ILabel[] getILabels(boolean filterFacetExcludedLabels)
          Returns the labels defined for this artifact.
 IMethod[] getIMethods()
           
 IMethod[] getIMethods(boolean filterFacetExcludedMethods)
          Returns the methods defined for this artifact.
 IAbstractArtifact[] getImplementedArtifacts()
          Returns an array containing all the artifacts that are implemented by this artifact;
 java.lang.String getImplementedArtifactsAsStr()
           
 IAbstractArtifact[] getImplementingIArtifacts()
          Returns an array containing all the artifacts that are implementing this.
 IField[] getInheritedIFields()
          Returns the inherited fields for this artifact.
 IField[] getInheritedIFields(boolean filterFacetExcludedFields)
          Returns the inherited fields for this artifact.
 ILabel[] getInheritedILabels()
          Returns the inherited labels for this artifact.
 ILabel[] getInheritedILabels(boolean filterFacetExcludedLabels)
          Returns the inherited labels for this artifact.
 IMethod[] getInheritedIMethods()
          Returns the inherited methods for this artifact.
 IMethod[] getInheritedIMethods(boolean filterFacetExcludedMethods)
          Returns the inherited methods for this artifact.
 ITigerstripeProject getIProject()
           
 IProjectDescriptor getIProjectDescriptor()
          Returns the details contained in the project that this artifact belongs to.
 org.eclipse.tigerstripe.internal.api.model.artifacts.ossj.IStandardSpecifics getIStandardSpecifics()
          Returns the standard specific details for this artifact.
 ITigerstripeProject getITigerstripeProject()
          Returns the project that contains this artifact.
 java.lang.String getLabel()
          Returns the label for this Artifact Type that will be displayed in the GUI
 java.lang.String getPackage()
          Returns the package where this artifact is defined.
 java.util.Collection<java.lang.String> getReferencedArtifacts()
           
 IAbstractArtifact[] getReferencedIArtifacts()
          Returns an array containing all the artifacts being referenced (through a reference or attribute) from this artifact.
 IAbstractArtifact[] getReferencingIArtifacts()
          Returns an array with all the artifacts referencing this artifact.
 org.eclipse.tigerstripe.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 isInActiveFacet()
          Returns true if this artifact is part of the active facet, false otherwise.
 boolean isReadonly()
          Returns true if this is a read-only artifact (i.e.
 IField makeIField()
          Make a new blank artifact field
 ILabel makeILabel()
          Make a new blank artifact label
 IMethod makeIMethod()
           
 void removeIFields(IField[] fields)
           
 void removeILabels(ILabel[] labels)
           
 void removeIMethods(IMethod[] methods)
           
 void setAbstract(boolean isAbstract)
          Sets the value of the isAbstract flag for this.
 void setExtendedIArtifact(IAbstractArtifact artifact)
           
 void setFullyQualifiedName(java.lang.String fqn)
           
 void setIFields(IField[] fields)
          Sets the fields for this Abstract Artifact
 void setILabels(ILabel[] labels)
          Sets the labels for this Abstract Artifact
 void setIMethods(IMethod[] methods)
           
 void setImplementedArtifacts(IAbstractArtifact[] artifacts)
           
 void setPackage(java.lang.String packageName)
           
 java.util.List<org.eclipse.tigerstripe.internal.api.utils.TigerstripeError> validate()
           
 void write(java.io.Writer writer)
           
 
Methods inherited from interface org.eclipse.tigerstripe.model.IModelComponent
addStereotypeInstance, getComment, getName, getVisibility, removeStereotypeInstance, removeStereotypeInstances, setComment, setName, setVisibility
 
Methods inherited from interface org.eclipse.tigerstripe.profile.stereotype.IStereotypeCapable
getStereotypeInstances
 

Method Detail

setFullyQualifiedName

void setFullyQualifiedName(java.lang.String fqn)

setPackage

void setPackage(java.lang.String packageName)

getIFields

IField[] getIFields()
Returns the fields defined for this artifact


makeIField

IField makeIField()
Make a new blank artifact field

Returns:

setIFields

void setIFields(IField[] fields)
Sets the fields for this Abstract Artifact

Parameters:
fields -
Throws:
java.lang.IllegalArgumentException

addIField

void addIField(IField field)

removeIFields

void removeIFields(IField[] fields)

getILabels

ILabel[] getILabels()
Returns the labels defined for this artifact


makeILabel

ILabel makeILabel()
Make a new blank artifact label

Returns:

setILabels

void setILabels(ILabel[] labels)
Sets the labels for this Abstract Artifact

Parameters:
labels -
Throws:
java.lang.IllegalArgumentException

addILabel

void addILabel(ILabel label)

removeILabels

void removeILabels(ILabel[] labels)

getIMethods

IMethod[] getIMethods()

makeIMethod

IMethod makeIMethod()

setIMethods

void setIMethods(IMethod[] methods)

addIMethod

void addIMethod(IMethod method)

removeIMethods

void removeIMethods(IMethod[] methods)

setExtendedIArtifact

void setExtendedIArtifact(IAbstractArtifact artifact)

doSave

void doSave(org.eclipse.tigerstripe.internal.api.utils.ITigerstripeProgressMonitor monitor)
            throws TigerstripeException
Throws:
TigerstripeException

doSilentSave

void doSilentSave(org.eclipse.tigerstripe.internal.api.utils.ITigerstripeProgressMonitor monitor)
                  throws TigerstripeException
Throws:
TigerstripeException

validate

java.util.List<org.eclipse.tigerstripe.internal.api.utils.TigerstripeError> validate()

write

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

asText

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

getIProject

ITigerstripeProject getIProject()

getArtifactType

java.lang.String getArtifactType()

setAbstract

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

Parameters:
isAbstract -

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.

getLabel

java.lang.String getLabel()
Returns the label for this Artifact Type that will be displayed in the GUI

Since:
1.2

getExtendedIArtifact

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

Returns:
IArtifact - the extended artifact

getExtendingArtifacts

IAbstractArtifact[] getExtendingArtifacts()
Returns an array of all the artifacts that extends this directly.


getChildren

java.lang.Object[] getChildren()
Returns all children for this artifact Children are Fields, Methods, Literals, and potentially ends for IRelationships


isInActiveFacet

boolean isInActiveFacet()
                        throws TigerstripeException
Returns true if this artifact is part of the active facet, false otherwise. If no active facet, always returns true;

Specified by:
isInActiveFacet in interface IModelComponent
Returns:
Throws:
TigerstripeException

getImplementedArtifactsAsStr

java.lang.String getImplementedArtifactsAsStr()

setImplementedArtifacts

void setImplementedArtifacts(IAbstractArtifact[] artifacts)

getArtifactPath

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

getUpdater

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

Returns:
Throws:
TigerstripeException

getAncestors

IAbstractArtifact[] getAncestors()
Returns the Ancestors of this class if defined. If no ancestor was defined return new IArtifact[0].

Returns:
IArtifact[] - an array of all ancestors to this artifact

getExtendingIArtifacts

IAbstractArtifact[] getExtendingIArtifacts()
Returns the list of artifacts that are extending "this" artifact.

Returns:
Since:
2.2-beta

getFieldITypes

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

Returns:

getFullyQualifiedName

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

Returns:
String - fully qualified name of this artifact

getIArtifactType

java.lang.String getIArtifactType()
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

getIFields

IField[] getIFields(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 new IField[0]. Note : Some artifact types do not support Fields and will always return an empty array.

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:
IField[] - an array of all the fields for this artifact
See Also:
getInheritedIFields()

getILabels

ILabel[] getILabels(boolean filterFacetExcludedLabels)
Returns the labels defined for this artifact. This will be limited to the labels defined locally in this artifact. If no label was defined return new IField[0]. Note : Some artifact types do not support Labels and will always return an empty array.

Parameters:
filterFacetExcludedLabels - - if set to true, all labels that are excluded by the active facet will be filtered out. If no facet is active, all labels are returned.
Returns:
ILabel[] - an array of all the labels for this artifact
See Also:
getInheritedILabels()

getIMethods

IMethod[] getIMethods(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 new IField[0]. Note : Some artifact types do not support Methods and will always return an empty array.

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:
IMethod[] - an array of all the methods for this artifact
See Also:
getInheritedIMethods()

getIProjectDescriptor

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

Returns:

getIStandardSpecifics

org.eclipse.tigerstripe.internal.api.model.artifacts.ossj.IStandardSpecifics getIStandardSpecifics()
Returns the standard specific details for this artifact.

Returns:

getImplementedArtifacts

IAbstractArtifact[] getImplementedArtifacts()
Returns an array containing all the artifacts that are implemented by this artifact;


getImplementingIArtifacts

IAbstractArtifact[] getImplementingIArtifacts()
Returns an array containing all the artifacts that are implementing this. NOTE: this method is not implemented yet and returns an empty array.

Returns:
Not implemented - returns an empty array

getInheritedIFields

IField[] getInheritedIFields()
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 new IField[0]. This is equivalent to getInheritedIFields(false) Note : Some artifact types do not support Fields and will always return an empty array.

Returns:
IField[] - an array of all the inherited fields for this artifact

getInheritedIFields

IField[] getInheritedIFields(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 new IField[0]. Note : Some artifact types do not support Fields and will always return an empty array.

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:
IField[] - an array of all the inherited fields for this artifact

getInheritedILabels

ILabel[] getInheritedILabels()
Returns the inherited labels for this artifact. Only inherited labels will be included, but all inherited labels (ie from all ancestors) will be included. If no label was inherited return new IField[0]. this is equivalent to getInheritedILabels(false) Note : Some artifact types do not support Labels and will always return an empty array.

Returns:
ILabel[] - an array of all the inherited labels for this artifact

getInheritedILabels

ILabel[] getInheritedILabels(boolean filterFacetExcludedLabels)
Returns the inherited labels for this artifact. Only inherited labels will be included, but all inherited labels (ie from all ancestors) will be included. If no label was inherited return new Iield[0]. Note : Some artifact types do not support Labels and will always return an empty array.

Parameters:
filterFacetExcludedLabels - - if set to true, all labels that are excluded by the active facet will be filtered out. If no facet is active, all labels are returned.
Returns:
ILabel[] - an array of all the inherited labels for this artifact

getInheritedIMethods

IMethod[] getInheritedIMethods()
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 new IField[0]. This is equivalent to getInheritedIMethods(false) Note : Some artifact types do not support Methods and will always return an empty array.

Returns:
IMethod[] - an array of all the inherited methods for this artifact

getInheritedIMethods

IMethod[] getInheritedIMethods(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 new IField[0]. Note : Some artifact types do not support Methods and will always return an empty array.

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:
IMethod[] - an array of all the inherited methods for this artifact

getITigerstripeProject

ITigerstripeProject getITigerstripeProject()
Returns the project that contains this artifact. NOTE: if this is contained in a module, the return is null. getIProjectDescriptor()

Returns:
the containing Project.

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.

getReferencedArtifacts

java.util.Collection<java.lang.String> getReferencedArtifacts()

getReferencedIArtifacts

IAbstractArtifact[] getReferencedIArtifacts()
Returns an array containing all the artifacts being referenced (through a reference or attribute) from this artifact.

Returns:

getReferencingIArtifacts

IAbstractArtifact[] getReferencingIArtifacts()
Returns an array with all the artifacts referencing this artifact. NOTE: this is currently not implemented and will always return an empty Array.

Returns:
Empty array

hasExtends

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

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

isAbstract

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

Returns:
true if the artifact is abstract, false otherwise