1 package org.modeshape.graph.connector.path; 2 3 import java.util.UUID; 4 import org.modeshape.graph.cache.CachePolicy; 5 import org.modeshape.graph.connector.RepositoryContext; 6 import org.modeshape.graph.connector.RepositorySource; 7 import org.modeshape.graph.connector.path.cache.PathCachePolicy; 8 9 /** 10 * An extension of the {@link RepositorySource} class that provides a {@link CachePolicy cache policy} and a 11 * {@link RepositoryContext repository context}. 12 */ 13 public interface PathRepositorySource extends RepositorySource { 14 15 /** 16 * Get whether this source allows updates. 17 * 18 * @return true if this source allows updates by clients, or false if no updates are allowed 19 * @see #setUpdatesAllowed(boolean) 20 */ 21 boolean areUpdatesAllowed(); 22 23 /** 24 * Set whether this source allows updates to data within workspaces 25 * 26 * @param updatesAllowed true if this source allows updates to data within workspaces clients, or false if updates are not 27 * allowed. 28 * @see #areUpdatesAllowed() 29 */ 30 void setUpdatesAllowed( boolean updatesAllowed ); 31 32 /** 33 * Returns the {@link PathCachePolicy cache policy} for the repository source 34 * 35 * @return the {@link PathCachePolicy cache policy} for the repository source 36 */ 37 PathCachePolicy getCachePolicy(); 38 39 /** 40 * Get the UUID that is used for the root node of each workspace 41 * 42 * @return the UUID that is used for the root node of each workspace 43 */ 44 UUID getRootNodeUuid(); 45 46 /** 47 * Get the name of the default workspace. 48 * 49 * @return the name of the workspace that should be used by default; never null 50 */ 51 String getDefaultWorkspaceName(); 52 53 /** 54 * Returns the {@link RepositoryContext repository context} for the repository source 55 * 56 * @return the {@link RepositoryContext repository context} for the repository source 57 */ 58 RepositoryContext getRepositoryContext(); 59 }