Interface IArtifact
-
- All Superinterfaces:
IVilType
- All Known Subinterfaces:
IFileSystemArtifact,IRuntimeArtifact
- All Known Implementing Classes:
AbstractJavaStatement,AlternativeFragment,ClassFileArtifact,ComponentArtifact,CompositeArtifact,CompositeFragmentArtifact,FileArtifact,FolderArtifact,FragmentArtifact,JavaAnnotation,JavaAssignment,JavaAttribute,JavaCall,JavaClass,JavaFileArtifact,JavaFragmentArtifact,JavaImport,JavaMethod,JavaPackage,JavaParentFragmentArtifact,JavaQualifiedName,MultipleSelectionFragment,OptionalityFragment,SimpleArtifact,VariabilityFragment,VtlFileArtifact,XmlAttribute,XmlComment,XmlElement,XmlFileArtifact,XmlNode,XmlRootElement
public interface IArtifact extends IVilType
Represents a generic artifact.- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccept(IArtifactVisitor visitor)Visits this artifact (and dependent on the visitor also contained artifacts and fragments) using the given visitor.voiddelete()Deletes this artifact.booleanexists()Returns whether this artifact is exists.BinarygetBinary()Returns the binary representation of the contents of this artifact for manipulation.java.lang.StringgetName()Returns the name of this artifact.TextgetText()Returns the textual representation of the contents of this artifact for manipulation.longlastModification()Returns the last modification timestamp of this artifact.voidrename(java.lang.String name)Renames this artifact.voidstore()Stores this artifact in case of changes.voidupdate()Called if the underlying real artifact may have been updated, e.g., by overriding it by another file.
-
-
-
Method Detail
-
delete
void delete() throws VilExceptionDeletes this artifact.- Throws:
VilException- in case of serious problems so that this operation cannot continue
-
getName
java.lang.String getName() throws VilExceptionReturns the name of this artifact.- Returns:
- the name of this artifact
- Throws:
VilException- in case of serious problems so that this operation cannot continue
-
rename
void rename(java.lang.String name) throws VilExceptionRenames this artifact.- Parameters:
name- the new name of this artifact- Throws:
VilException- in case of serious problems so that this operation cannot continue
-
getText
Text getText() throws VilException
Returns the textual representation of the contents of this artifact for manipulation. In case of binary artifacts, the returned object may be empty.- Returns:
- the textual representation of the contents
- Throws:
VilException- in case of obtaining the representation causes serious problems
-
getBinary
Binary getBinary() throws VilException
Returns the binary representation of the contents of this artifact for manipulation.- Returns:
- the binary representation of the contents
- Throws:
VilException- in case of obtaining the representation causes serious problems
-
accept
void accept(IArtifactVisitor visitor)
Visits this artifact (and dependent on the visitor also contained artifacts and fragments) using the given visitor.- Parameters:
visitor- the visitor used for visiting this artifact
-
update
void update() throws VilExceptionCalled if the underlying real artifact may have been updated, e.g., by overriding it by another file.- Throws:
VilException- in case that updating fails
-
lastModification
long lastModification()
Returns the last modification timestamp of this artifact.- Returns:
- the last modification timestamp, 0 if unknown
-
exists
boolean exists()
Returns whether this artifact is exists.- Returns:
trueif this artifact exists,falseelse
-
store
void store() throws VilExceptionStores this artifact in case of changes.- Throws:
VilException- in case of problems storing this artifact
-
-