IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.ras.profile.management.artifact.adapter
Interface IArtifactManagerAdapter


public interface IArtifactManagerAdapter

The IArtifactManagerAdapter is used to adapt an object to one that allows it to be managed by the IArtifactManager. This abstracts the underlying object type from the behaviors expected by the IArtifactManager. This interface is expected to be implemented by clients. Word of caution, it's highly probable that this interface will grow over time.


Method Summary
 void accept(IArtifactVisitor visitor)
          Accepts the given visitor.
 boolean addArtifact(Artifact anArtifact)
          Adds an Artifact to the artifact hierarchy being managed.
 Object getAdapted()
          Retrieves the object that is being adapted to be managed by an instance of an IArtifactManager.
 boolean isAdapterForType(Object type)
          Returns whether the adapter is of the given type.
 

Method Detail

accept

public void accept(IArtifactVisitor visitor)
Accepts the given visitor. The IArtifactManagerAdapter will adapt to an object containing an Artifact hierarchy. Each Artifact contained in the hierarchy will be visited.

Parameters:
visitor - the visitor used to visit each Artifact
Throws:
IllegalArgumentException - if visitor is null.
See Also:
IArtifactVisitor.visit(Artifact)

isAdapterForType

public boolean isAdapterForType(Object type)
Returns whether the adapter is of the given type. In general, an IArtifactManagerAdapter may be the adapter for many types that contain an Artifact hierarchy.

Parameters:
type - the type.
Returns:
true if the adapter is of the given type.

getAdapted

public Object getAdapted()
Retrieves the object that is being adapted to be managed by an instance of an IArtifactManager.

Returns:
the object being adapted

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.