org.eclipse.wst.common.componentcore.resources
Interface IVirtualReference


public interface IVirtualReference

Represents a dependency between two components: EnclosingComponent->ReferencedComponent.

The ReferencedComponent may exist in another project or as a binary form on the classpath of the project.

Since:
1.0

Field Summary
static int DEPENDENCY_TYPE_CONSUMES
          Indicates that the dependency will be absorbed as is without archiving.
static int DEPENDENCY_TYPE_USES
          Indicates that the dependency should be archived into a *.?ar format before being absorbed.
 
Method Summary
 void create(int updateFlags, IProgressMonitor aMonitor)
          Creates this virtual reference in model, if it doesn't already exist.
 boolean exists()
          Returns whether this reference actual exists in the model
 int getDependencyType()
           
 IVirtualComponent getEnclosingComponent()
          The enclosing component contains this reference, and will absorb the contents of the referenced component
 IVirtualComponent getReferencedComponent()
          The referenced component is "targeted" by the reference, and will be absorbed by the enclosing component.
 IPath getRuntimePath()
          The runtime path indicates where the contents of the referenced component will be absorbed within the context of the enclosing component.
 void setDependencyType(int aDependencyType)
          The dependencyType indicates how the contents of the referenced component will be absorbed.
 void setRuntimePath(IPath aRuntimePath)
          The runtime path indicates where the contents of the referenced component will be absorbed within the context of the enclosing component.
 

Field Detail

DEPENDENCY_TYPE_USES

public static final int DEPENDENCY_TYPE_USES
Indicates that the dependency should be archived into a *.?ar format before being absorbed.

See Also:
Constant Field Values

DEPENDENCY_TYPE_CONSUMES

public static final int DEPENDENCY_TYPE_CONSUMES
Indicates that the dependency will be absorbed as is without archiving.

See Also:
Constant Field Values
Method Detail

create

public void create(int updateFlags,
                   IProgressMonitor aMonitor)
Creates this virtual reference in model, if it doesn't already exist.

Parameters:
updateFlags - Currently no update flags apply.
aMonitor - A progress monitor to track the completion of the operation

exists

public boolean exists()
Returns whether this reference actual exists in the model

Returns:
whether this reference actual exists in the model

setRuntimePath

public void setRuntimePath(IPath aRuntimePath)
The runtime path indicates where the contents of the referenced component will be absorbed within the context of the enclosing component.

Parameters:
aRuntimePath - A value component-relative path.

getRuntimePath

public IPath getRuntimePath()
The runtime path indicates where the contents of the referenced component will be absorbed within the context of the enclosing component.

Returns:
A value component-relative path.

setDependencyType

public void setDependencyType(int aDependencyType)
The dependencyType indicates how the contents of the referenced component will be absorbed.

Parameters:
aDependencyType - One of DEPENDENCY_TYPE_USES or DEPENDENCY_TYPE_CONSUMES
See Also:
DEPENDENCY_TYPE_CONSUMES, DEPENDENCY_TYPE_USES

getDependencyType

public int getDependencyType()
Returns:
One of DEPENDENCY_TYPE_USES or DEPENDENCY_TYPE_CONSUMES
See Also:
DEPENDENCY_TYPE_CONSUMES, DEPENDENCY_TYPE_USES

getEnclosingComponent

public IVirtualComponent getEnclosingComponent()
The enclosing component contains this reference, and will absorb the contents of the referenced component

Returns:
The enclosing component

getReferencedComponent

public IVirtualComponent getReferencedComponent()
The referenced component is "targeted" by the reference, and will be absorbed by the enclosing component.

Returns:
the referenced component.