Package org.eclipse.emf.cdo.view

## Class AbstractCDOViewProvider

- java.lang.Object
- - org.eclipse.emf.cdo.view.AbstractCDOViewProvider

- All Implemented Interfaces:
    `CDOViewProvider`, `CDOViewProvider.CDOViewProvider2`
  Direct Known Subclasses:
    `CDONet4jViewProvider`, `ManagedContainerViewProvider`

      public abstract class AbstractCDOViewProvider
      extends java.lang.Object
      implements CDOViewProvider.CDOViewProvider2

  Base logic to handle CDOViewProvider priority and regular expression.
  Since:
    2.0
  Author:
    Victor Roldan Betancort

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.view.CDOViewProvider

      `CDOViewProvider.CDOViewProvider2`

  - ### Field Summary

    - ### Fields inherited from interface org.eclipse.emf.cdo.view.CDOViewProvider

      `DEFAULT_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractCDOViewProvider()` |
    `AbstractCDOViewProvider​(java.lang.String regex)` |
    `AbstractCDOViewProvider​(java.lang.String regex, int priority)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected java.lang.String` | `getActualName()` |
    `protected java.lang.String` | `getDeclaredName()` |
    `java.lang.String` | `getPath​(org.eclipse.emf.common.util.URI uri)` | Should be overridden for non-canonical URI formats!
    `int` | `getPriority()` | Returns the priority of this provider.
    `java.lang.String` | `getRegex()` | Returns the regular expression that determines if the provider can handle certain URI
    `org.eclipse.emf.common.util.URI` | `getResourceURI​(CDOView view, java.lang.String path)` | Must be overridden for non-canonical URI formats!
    `org.eclipse.emf.common.util.URI` | `getViewURI​(CDOView view)` |
    `org.eclipse.emf.common.util.URI` | `getViewURI​(org.eclipse.emf.common.util.URI uri)` | Should be overridden for non-canonical URI formats!
    `boolean` | `matchesRegex​(org.eclipse.emf.common.util.URI uri)` | Checks if the URI matches with the regular expression of this provider
    `void` | `setPriority​(int priority)` |
    `void` | `setRegex​(java.lang.String regex)` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.emf.cdo.view.CDOViewProvider

      `getView`

- - ### Constructor Detail

    - #### AbstractCDOViewProvider

          public AbstractCDOViewProvider()

    - #### AbstractCDOViewProvider

          public AbstractCDOViewProvider​(java.lang.String regex,
                                         int priority)

    - #### AbstractCDOViewProvider

          public AbstractCDOViewProvider​(java.lang.String regex)

  - ### Method Detail

    - #### getPriority

          public int getPriority()

      Description copied from interface: `CDOViewProvider`
      Returns the priority of this provider. Usually used to choose between several `CDOViewProviders` that match the same repository URI. A higher priority value is preferred in that decision.
      Specified by:
        `getPriority` in interface `CDOViewProvider`

    - #### setPriority

          public void setPriority​(int priority)

    - #### getRegex

          public java.lang.String getRegex()

      Description copied from interface: `CDOViewProvider`
      Returns the regular expression that determines if the provider can handle certain URI
      Specified by:
        `getRegex` in interface `CDOViewProvider`

    - #### setRegex

          public void setRegex​(java.lang.String regex)

    - #### matchesRegex

          public boolean matchesRegex​(org.eclipse.emf.common.util.URI uri)

      Description copied from interface: `CDOViewProvider`
      Checks if the URI matches with the regular expression of this provider
      Specified by:
        `matchesRegex` in interface `CDOViewProvider`

    - #### getResourceURI

          public org.eclipse.emf.common.util.URI getResourceURI​(CDOView view,
                                                                java.lang.String path)

      Must be overridden for non-canonical URI formats!
      Specified by:
        `getResourceURI` in interface `CDOViewProvider`
      Since:
        4.0

    - #### getViewURI

          public org.eclipse.emf.common.util.URI getViewURI​(CDOView view)

      Specified by:
        `getViewURI` in interface `CDOViewProvider.CDOViewProvider2`
      Since:
        4.4

    - #### getViewURI

          public org.eclipse.emf.common.util.URI getViewURI​(org.eclipse.emf.common.util.URI uri)

      Should be overridden for non-canonical URI formats!
      Specified by:
        `getViewURI` in interface `CDOViewProvider.CDOViewProvider2`
      Since:
        4.4

    - #### getPath

          public java.lang.String getPath​(org.eclipse.emf.common.util.URI uri)

      Should be overridden for non-canonical URI formats!
      Specified by:
        `getPath` in interface `CDOViewProvider.CDOViewProvider2`
      Since:
        4.4

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getDeclaredName

          protected java.lang.String getDeclaredName()

      Since:
        4.12

    - #### getActualName

          protected java.lang.String getActualName()

      Since:
        4.12