IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.ras.profile.management.artifact
Interface IArtifactManager


public interface IArtifactManager

The IArtifactManager provides a level of abstraction for managing elements that contain some form of Artifact hierarchy. It isolates the client from becoming intimate with the sturcture and location of that hierarchy. This interface is not intended to be implemented by clients.


Field Summary
static int UNLIMITED
          Indicates that an unlimited number of Artifact instances should be returned in method calls that have a maxReturned parameter.
 
Method Summary
 boolean addArtifact(Artifact anArtifact)
          Adds an Artifact to the artifact hierarchy being managed.
 boolean containsArtifact(Artifact theArtifact)
          Determines if a particular Artifact is contained in the artifact hierarchy.
 boolean containsArtifact(IArtifactFilter theArtifactFilter)
          Determines if an Artifact is contained in the artifact hierarchy that matches the given filter.
 Artifact findArtifact(IArtifactFilter theArtifactFilter)
          Finds an Artifact that matches the given filter.
 IArtifactManagerAdapter getAdapter()
          Retrieves the adapter for the object being managed
 Collection getArtifacts()
          Retrieves all the artifacts in the artifact hierarchy.
 Collection getArtifacts(IArtifactFilter theArtifactFilter, int maxReturned)
          Retrieves a Collection of Artifact instances that match the given filter.
 

Field Detail

UNLIMITED

public static final int UNLIMITED
Indicates that an unlimited number of Artifact instances should be returned in method calls that have a maxReturned parameter.

See Also:
Constant Field Values
Method Detail

getAdapter

public IArtifactManagerAdapter getAdapter()
Retrieves the adapter for the object being managed

Returns:
the adapter for the object being managed

getArtifacts

public Collection getArtifacts()
Retrieves all the artifacts in the artifact hierarchy.

Returns:
a Collection containing all artifacts in the artifact hierarchy

getArtifacts

public Collection getArtifacts(IArtifactFilter theArtifactFilter,
                               int maxReturned)
                        throws IllegalArgumentException
Retrieves a Collection of Artifact instances that match the given filter. A maximum of maxReturned will be returned. Walking of the artifact heirarchy will cease when the end is reached or maxReturned are found. Use UNLIMITEDto indicate there is no limit on the number returned.

Parameters:
theArtifactFilter - the filter to use find matching artifacts
maxReturned - the maximum number of artifacts that can be returned
Returns:
a Collection of artifacts matching the filter
Throws:
IllegalArgumentException - if theArtifactFilter is null.

containsArtifact

public boolean containsArtifact(Artifact theArtifact)
Determines if a particular Artifact is contained in the artifact hierarchy.

Parameters:
theArtifact - to find in the artifact hierarchy
Returns:
true if the Artifact is contained in the hierachy
Throws:
IllegalArgumentException - if theArtifact is null.

containsArtifact

public boolean containsArtifact(IArtifactFilter theArtifactFilter)
Determines if an Artifact is contained in the artifact hierarchy that matches the given filter.

Parameters:
theArtifactFilter - the filter to use find matching artifact
Returns:
true if the artifact hierarch contains an Artifact matching the filter criteria
Throws:
IllegalArgumentException - if theArtifactFilter is null.

findArtifact

public Artifact findArtifact(IArtifactFilter theArtifactFilter)
Finds an Artifact that matches the given filter.

Parameters:
theArtifactFilter - the filter to use find the matching artifact
Returns:
an Artifact matching the filter criteria or null
Throws:
IllegalArgumentException - if theArtifactFilter is null.

addArtifact

public boolean addArtifact(Artifact anArtifact)
                    throws IllegalArgumentException
Adds an Artifact to the artifact hierarchy being managed.

Parameters:
anArtifact - to add to the artifact hierarchy
Returns:
true if successfully added
Throws:
IllegalArgumentException - if anArtifact is null

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.