TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.hyades.ui.extension
Interface IAssociationMapping

All Superinterfaces:
IDisposable

public interface IAssociationMapping
extends IDisposable

This interface is not intended to be implemented by clients. Instances can be obtained by org.eclipse.hyades.ui.extension.IAssociationMappingRegistry#retrieveAssociationMapping(String).


Method Summary
 boolean addToAvoidedSet(java.lang.String type, IAssociationDescriptor associationDescriptor)
          Adds an association descriptor to the "avoided set" of a given type.
 IAssociationDescriptor[] associationDescriptors()
          Returns all the association descriptors of this mapping.
 IAssociationDescriptor createAssociationDescriptor()
          Creates an association descriptor owned by this mapping.
 IAssociationDescriptor getAssociationDescriptor(java.lang.String id)
          Returns the association descriptor that has the specified id and that is not associated to any type.
 IAssociationDescriptor getAssociationDescriptor(java.lang.String type, java.lang.String id)
          Returns the association descriptor that has the specified id and that is a specific type.
 IAssociationDescriptor[] getAssociationDescriptors()
          Returns the association descriptors of this mapping that are not associated to any type.
 IAssociationDescriptor[] getAssociationDescriptors(java.lang.String type)
          Returns the association descriptors of this mapping that are associated to - or that applies to - a type.
 IAssociationMappingRegistry getAssociationMappingRegistry()
          Returns the association mapping registry that contains this mapping
 IAssociationDescriptor[] getAvoidedAssociationDescriptors(java.lang.String type)
          Returns all the association descriptors from the "avoided set" of a given type.
 IAssociationDescriptor getDefaultAssociationDescriptor()
          Returns the default association descriptor from the set of descriptors that are not associated to a type.
 IAssociationDescriptor getDefaultAssociationDescriptor(java.lang.String type)
          Returns the default association descriptor associated to a type.
 java.lang.String getExtensionPoint()
          Returns the extension point name that defines the association descriptors of this mapping.
 java.lang.String getPluginId()
          Returns the id of the plugin that declares the association descriptors of this mapping.
 java.lang.String[] getTypes()
          Returns the types that are used with this mapping.
 boolean removeAllFromAvoidSet(java.lang.String type)
          Removes all the association descriptors from the "avoided set" of a given type.
 boolean removeFromAvoidedSet(java.lang.String type, IAssociationDescriptor associationDescriptor)
          Removes an association descriptor from the "avoided set" of a given type.
 boolean setDefaultAssociationDescriptor(IAssociationDescriptor associationDescriptor)
          Sets the default association descriptor for the set of descriptors that are not associated to a type.
 boolean setDefaultAssociationDescriptor(java.lang.String type, IAssociationDescriptor associationDescriptor)
          Sets the default association descriptor for a given type.
 
Methods inherited from interface org.eclipse.hyades.ui.util.IDisposable
dispose
 

Method Detail

getAssociationMappingRegistry

IAssociationMappingRegistry getAssociationMappingRegistry()
Returns the association mapping registry that contains this mapping

Returns:
IAssociationMappingRegistry

getExtensionPoint

java.lang.String getExtensionPoint()
Returns the extension point name that defines the association descriptors of this mapping.

Returns:
String

getPluginId

java.lang.String getPluginId()
Returns the id of the plugin that declares the association descriptors of this mapping.

Returns:
String

getTypes

java.lang.String[] getTypes()
Returns the types that are used with this mapping.

Returns:
String[]

associationDescriptors

IAssociationDescriptor[] associationDescriptors()
Returns all the association descriptors of this mapping. In other words, this methods returns the association descriptors of all the types that are used by this map.

This method doesn't follow the "get" naming convention to reduce the change of being used in the wrong scenario.

Returns:
IAssociationDescriptor[]

getAssociationDescriptors

IAssociationDescriptor[] getAssociationDescriptors()
Returns the association descriptors of this mapping that are not associated to any type.

Returns:
IAssociationDescriptor[]

getAssociationDescriptors

IAssociationDescriptor[] getAssociationDescriptors(java.lang.String type)
                                                   throws java.lang.IllegalArgumentException
Returns the association descriptors of this mapping that are associated to - or that applies to - a type.

The type argument is, for example, a type of "Monitor" or a type of "Test Suite".

Parameters:
type -
Returns:
IAssociationDescriptor[]
Throws:
java.lang.IllegalArgumentException - if the type is null.

getAssociationDescriptor

IAssociationDescriptor getAssociationDescriptor(java.lang.String id)
Returns the association descriptor that has the specified id and that is not associated to any type.

Parameters:
id -
Returns:
IAssociationDescriptor

getAssociationDescriptor

IAssociationDescriptor getAssociationDescriptor(java.lang.String type,
                                                java.lang.String id)
                                                throws java.lang.IllegalArgumentException
Returns the association descriptor that has the specified id and that is a specific type.

Parameters:
id -
type -
Returns:
IAssociationDescriptor
Throws:
java.lang.IllegalArgumentException - if the type is null.

getDefaultAssociationDescriptor

IAssociationDescriptor getDefaultAssociationDescriptor()
Returns the default association descriptor from the set of descriptors that are not associated to a type.

Returns:
IAssociationDescriptor

getDefaultAssociationDescriptor

IAssociationDescriptor getDefaultAssociationDescriptor(java.lang.String type)
                                                       throws java.lang.IllegalArgumentException
Returns the default association descriptor associated to a type.

Parameters:
type -
Returns:
IAssociationDescriptor
Throws:
java.lang.IllegalArgumentException - if the type is null.

setDefaultAssociationDescriptor

boolean setDefaultAssociationDescriptor(IAssociationDescriptor associationDescriptor)
                                        throws java.lang.IllegalArgumentException
Sets the default association descriptor for the set of descriptors that are not associated to a type.

Parameters:
associationDescriptor -
Returns:
boolean true if the default was set or false otherwise.
Throws:
IllegalArgumentException
    -
  1. if the associationDescriptor is not owned by this mapping or
  2. if the association descriptor doesn't apply to all the types.
java.lang.IllegalArgumentException

setDefaultAssociationDescriptor

boolean setDefaultAssociationDescriptor(java.lang.String type,
                                        IAssociationDescriptor associationDescriptor)
                                        throws java.lang.IllegalArgumentException
Sets the default association descriptor for a given type.

Parameters:
type -
associationDescriptor -
Returns:
boolean true if the default was set or false otherwise.
Throws:
IllegalArgumentException
    -
  1. if the associationDescriptor is not owned by this mapping or
  2. if the association descriptor doesn't apply to the type or
  3. the type is null.
java.lang.IllegalArgumentException

addToAvoidedSet

boolean addToAvoidedSet(java.lang.String type,
                        IAssociationDescriptor associationDescriptor)
Adds an association descriptor to the "avoided set" of a given type. The avoided set has the descriptors that could be used by a type but won't due to user preferences.

Parameters:
type -
associationDescriptor -
Returns:
true if the association was added to the avoid set or false otherwise.

removeFromAvoidedSet

boolean removeFromAvoidedSet(java.lang.String type,
                             IAssociationDescriptor associationDescriptor)
Removes an association descriptor from the "avoided set" of a given type. The avoided set has the descriptors that could be used by a type but won't due to user preferences.

Parameters:
type -
associationDescriptor -
Returns:
true if the association was removed from the avoid set or false otherwise.

removeAllFromAvoidSet

boolean removeAllFromAvoidSet(java.lang.String type)
Removes all the association descriptors from the "avoided set" of a given type. The avoided set has the descriptors that could be used by a type but won't due to user preferences.

Parameters:
type -
associationDescriptor -
Returns:
true if the association was removed from the avoid set or false otherwise.

getAvoidedAssociationDescriptors

IAssociationDescriptor[] getAvoidedAssociationDescriptors(java.lang.String type)
Returns all the association descriptors from the "avoided set" of a given type. The avoided set has the descriptors that could be used by a type but won't due to user preferences.

Parameters:
type -
Returns:
IAssociationDescriptor[]

createAssociationDescriptor

IAssociationDescriptor createAssociationDescriptor()
Creates an association descriptor owned by this mapping. The descriptor is not associated to any particular type.

Although the descriptor created by this method is added to the list of untyped descriptors of this mapping, there is no validation against the IAssociationDescriptor that may be registered to this mapping's registry. It is up to the invoker of this method that the descriptor has all the required attributes.

Returns:
IAssociationDescriptor

TPTP 4.5.0 Platform Project
Public API Specification