Runtime

## org.eclipse.gmf.runtime.common.core.service
Class ProviderPriority

    java.lang.Object
      org.eclipse.gmf.runtime.common.core.util.EnumeratedType
          org.eclipse.gmf.runtime.common.core.service.ProviderPriority

All Implemented Interfaces:
  java.io.Serializable

    public class ProviderPriority

extends EnumeratedType

An enumeration of service provider priorities.

Each service provider has a `ProviderPriority` that is declared in its extension descriptor. It is the `ExecutionStrategy` that determines how service provider priorities are used to select a provider to service each client request. For example, if the `ExecutionStrategy.FIRST` is used, the provider with the highest priority will give an answer to the request.

See Also:
  `org.eclipse.gmf.runtime.common.core.service`, Serialized Form

Field Summary
`static ProviderPriority` `HIGH` The second-highest provider priority.
`static ProviderPriority` `HIGHEST` The highest provider priority.
`static ProviderPriority` `LOW` The second-lowest provider priority.
`static ProviderPriority` `LOWEST` The lowest provider priority.
`static ProviderPriority` `MEDIUM` The middle provider priority.

Constructor Summary
`protected` `ProviderPriority(java.lang.String name, int ordinal)` Constructs a new provider priority with the specified name and ordinal.

Method Summary
`int` `compareTo(java.lang.Object object)` Compares this provider priority with the specified object for order.
`protected java.util.List` `getValues()` Retrieves the list of constants for this enumerated type.
`static ProviderPriority` `parse(java.lang.String name)` Retrieves the provider priority with the specified name.

Methods inherited from class org.eclipse.gmf.runtime.common.core.util.EnumeratedType
`equals, getName, getOrdinal, hashCode, readResolve, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### LOWEST

    public static final ProviderPriority LOWEST

  The lowest provider priority.

### LOW

    public static final ProviderPriority LOW

  The second-lowest provider priority.

### MEDIUM

    public static final ProviderPriority MEDIUM

  The middle provider priority.

### HIGH

    public static final ProviderPriority HIGH

  The second-highest provider priority.

### HIGHEST

    public static final ProviderPriority HIGHEST

  The highest provider priority.

Constructor Detail

### ProviderPriority

    protected ProviderPriority(java.lang.String name,
                               int ordinal)

  Constructs a new provider priority with the specified name and ordinal.

  Parameters:
    `name` - The name of the new provider priority.
    `ordinal` - The ordinal for the new provider priority .

Method Detail

### parse

    public static ProviderPriority parse(java.lang.String name)

  Retrieves the provider priority with the specified name.

  Parameters:
    `name` - The name of the provider priority to be retrieved.
  Returns:
    The provider priority with the specified name.
  Throws:
    `java.lang.IllegalArgumentException` - If a provider priority with the specified name does not exist.

### getValues

    protected java.util.List getValues()

  Retrieves the list of constants for this enumerated type.

  Specified by:
    `getValues` in class `EnumeratedType`
  Returns:
    The list of constants for this enumerated type.

### compareTo

    public int compareTo(java.lang.Object object)

  Compares this provider priority with the specified object for order. Returns a negative integer, zero, or a positive integer as this provider priority is less than, equal to, or greater than the specified object.

  Parameters:
    `object` - The object to be compared.
  Returns:
    A negative integer, zero, or a positive integer as this provider priority is less than, equal to, or greater than the specified object.
  Throws:
    `java.lang.ClassCastException` - If the specified object's type prevents it from being compared to this provider priority.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.