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
  Apiviz

- - ### 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 and 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 and Description
    --- | ---
    `java.lang.String` | `getPath(URI uri)` Should be overwritten 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
    `URI` | `getResourceURI(CDOView view, java.lang.String path)` Must be overwritten for non-canonical URI formats!
    `URI` | `getViewURI(CDOView view)`
    `URI` | `getViewURI(URI uri)` Should be overwritten for non-canonical URI formats!
    `boolean` | `matchesRegex(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 `CDOViewProvider` that match the same repository URI.
      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(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 URI getResourceURI(CDOView view,
                                    java.lang.String path)

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

    - #### getViewURI

          public final URI getViewURI(CDOView view)

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

    - #### getViewURI

          public URI getViewURI(URI uri)

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

    - #### getPath

          public java.lang.String getPath(URI uri)

      Should be overwritten 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`

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html