org.eclipse.emf.cdo.view
Class AbstractCDOViewProvider

java.lang.Object
  extended by org.eclipse.emf.cdo.view.AbstractCDOViewProvider
All Implemented Interfaces:
CDOViewProvider
Direct Known Subclasses:
CDONet4jViewProvider, ManagedContainerViewProvider

public abstract class AbstractCDOViewProvider
extends Object
implements CDOViewProvider

Base logic to handle CDOViewProvider priority and regular expression.

Since:
2.0

Field Summary
 
Fields inherited from interface org.eclipse.emf.cdo.view.CDOViewProvider
DEFAULT_PRIORITY
 
Constructor Summary
AbstractCDOViewProvider()
           
AbstractCDOViewProvider(String regex)
           
AbstractCDOViewProvider(String regex, int priority)
           
 
Method Summary
 int getPriority()
          Returns the priority of this provider.
 String getRegex()
          Returns the regular expression that determines if the provider can handle certain URI
 URI getResourceURI(CDOView view, String path)
          Must 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(String regex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.cdo.view.CDOViewProvider
getView
 

Constructor Detail

AbstractCDOViewProvider

public AbstractCDOViewProvider()

AbstractCDOViewProvider

public AbstractCDOViewProvider(String regex,
                               int priority)

AbstractCDOViewProvider

public AbstractCDOViewProvider(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 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(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,
                          String path)
Must be overwritten for non-canonical URI formats!

Specified by:
getResourceURI in interface CDOViewProvider
Since:
4.0


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.