chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r934878 [2/13] - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src: main/java/org/apache/chemistry/opencmis/inmemory/ main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ mai...
Date Fri, 16 Apr 2010 14:00:25 GMT
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemoryProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemoryProvider.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemoryProvider.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemoryProvider.java Fri Apr 16 14:00:23 2010
@@ -47,96 +47,95 @@ import org.apache.chemistry.opencmis.inm
  * the in-memory provider
  * 
  * @author Jens
- *
+ * 
  */
 public class CmisInMemoryProvider {
 
-  protected StoreManager fStoreManager;
-  protected RepositoryService fRepositoryService;
-  protected NavigationService fNavigationService;
-  protected ObjectService fObjectService;
-  protected VersioningService fVersioningService;
-  protected MultiFilingService fMultiService;
-  protected RepositoryInfo fRepositoryInfo;
-  protected DiscoveryService fDiscoveryService;
-
-  public CmisInMemoryProvider(Map<String, String> cfgParams) {
-    setup (cfgParams);    
-  }
-  
-  protected CmisInMemoryProvider() {  
-  }
-  
-  public RepositoryService getRepositoryService() {
-    return fRepositoryService;
-  }
-
-  public NavigationService getNavigationService() {
-    return fNavigationService;
-  }
-
-  public ObjectService getObjectService() {
-    return fObjectService;    
-  }
-
-  public VersioningService getVersioningService() {
-   return fVersioningService; 
-  }
-
-  public RelationshipService getRelationshipService() {
-    return null;
-  }
-
-  public DiscoveryService getDiscoveryService() {
-    return fDiscoveryService;
-  }
-
-  public MultiFilingService getMultiFilingService() {
-    return fMultiService;
-  }
-
-  public AclService getAclService() {
-    return null;
-  }
-
-  public PolicyService getPolicyService() {
-    return null;
-  }
-
-  protected void setup(Map<String, String> cfgParams) {
-    String repositoryClassName = (String) cfgParams.get(ConfigConstants.REPOSITORY_CLASS);
-    if (null==repositoryClassName)
-      repositoryClassName = StoreManagerImpl.class.getName();
-    
-    fStoreManager = StoreManagerFactory.createInstance(repositoryClassName);
-    String repositoryId  = (String) cfgParams.get(ConfigConstants.REPOSITORY_ID);
-    
-    // first create repository
-    if (null != repositoryId ) {
-      // then create/initialize type system
-      String typeCreatorClassName = (String) cfgParams.get(ConfigConstants.TYPE_CREATOR_CLASS);
-      fStoreManager.createAndInitRepository(repositoryId, typeCreatorClassName);
-    } else {    
-      // then init repository (note: loads root folder which requires cmis:folder type available)
-      fStoreManager.initRepository(null);
-    }
-    
-    InMemoryRepositoryServiceImpl repSvc = new InMemoryRepositoryServiceImpl(fStoreManager);
-    InMemoryNavigationServiceImpl navSvc = new InMemoryNavigationServiceImpl(fStoreManager);
-    InMemoryObjectServiceImpl objSvc = new InMemoryObjectServiceImpl(fStoreManager);
-    InMemoryVersioningServiceImpl verSvc = new InMemoryVersioningServiceImpl(fStoreManager, objSvc);
-    InMemoryDiscoveryServiceImpl disSvc = new InMemoryDiscoveryServiceImpl(fStoreManager, repSvc,
-        navSvc);
-    InMemoryMultiFilingServiceImpl multiSvc = new InMemoryMultiFilingServiceImpl(fStoreManager);
-
-    // initialize services
-    fRepositoryService = new RepositoryServiceImpl(repSvc);
-    fNavigationService = new NavigationServiceImpl(navSvc);
-    fObjectService = new ObjectServiceImpl(objSvc);
-    fVersioningService = new VersioningServiceImpl(verSvc);    
-    fMultiService = new MultiFilingServiceImpl(multiSvc);
-    fDiscoveryService = new DiscoveryServiceImpl(disSvc);
-  }
+	protected StoreManager fStoreManager;
+	protected RepositoryService fRepositoryService;
+	protected NavigationService fNavigationService;
+	protected ObjectService fObjectService;
+	protected VersioningService fVersioningService;
+	protected MultiFilingService fMultiService;
+	protected RepositoryInfo fRepositoryInfo;
+	protected DiscoveryService fDiscoveryService;
+
+	public CmisInMemoryProvider(Map<String, String> cfgParams) {
+		setup(cfgParams);
+	}
+
+	protected CmisInMemoryProvider() {
+	}
+
+	public RepositoryService getRepositoryService() {
+		return fRepositoryService;
+	}
+
+	public NavigationService getNavigationService() {
+		return fNavigationService;
+	}
+
+	public ObjectService getObjectService() {
+		return fObjectService;
+	}
+
+	public VersioningService getVersioningService() {
+		return fVersioningService;
+	}
+
+	public RelationshipService getRelationshipService() {
+		return null;
+	}
+
+	public DiscoveryService getDiscoveryService() {
+		return fDiscoveryService;
+	}
+
+	public MultiFilingService getMultiFilingService() {
+		return fMultiService;
+	}
+
+	public AclService getAclService() {
+		return null;
+	}
+
+	public PolicyService getPolicyService() {
+		return null;
+	}
+
+	protected void setup(Map<String, String> cfgParams) {
+		String repositoryClassName = (String) cfgParams.get(ConfigConstants.REPOSITORY_CLASS);
+		if (null == repositoryClassName)
+			repositoryClassName = StoreManagerImpl.class.getName();
+
+		fStoreManager = StoreManagerFactory.createInstance(repositoryClassName);
+		String repositoryId = (String) cfgParams.get(ConfigConstants.REPOSITORY_ID);
+
+		// first create repository
+		if (null != repositoryId) {
+			// then create/initialize type system
+			String typeCreatorClassName = (String) cfgParams.get(ConfigConstants.TYPE_CREATOR_CLASS);
+			fStoreManager.createAndInitRepository(repositoryId, typeCreatorClassName);
+		} else {
+			// then init repository (note: loads root folder which requires
+			// cmis:folder type available)
+			fStoreManager.initRepository(null);
+		}
+
+		InMemoryRepositoryServiceImpl repSvc = new InMemoryRepositoryServiceImpl(fStoreManager);
+		InMemoryNavigationServiceImpl navSvc = new InMemoryNavigationServiceImpl(fStoreManager);
+		InMemoryObjectServiceImpl objSvc = new InMemoryObjectServiceImpl(fStoreManager);
+		InMemoryVersioningServiceImpl verSvc = new InMemoryVersioningServiceImpl(fStoreManager, objSvc);
+		InMemoryDiscoveryServiceImpl disSvc = new InMemoryDiscoveryServiceImpl(fStoreManager, repSvc, navSvc);
+		InMemoryMultiFilingServiceImpl multiSvc = new InMemoryMultiFilingServiceImpl(fStoreManager);
+
+		// initialize services
+		fRepositoryService = new RepositoryServiceImpl(repSvc);
+		fNavigationService = new NavigationServiceImpl(navSvc);
+		fObjectService = new ObjectServiceImpl(objSvc);
+		fVersioningService = new VersioningServiceImpl(verSvc);
+		fMultiService = new MultiFilingServiceImpl(multiSvc);
+		fDiscoveryService = new DiscoveryServiceImpl(disSvc);
+	}
 
-  
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemorySpi.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemorySpi.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemorySpi.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemorySpi.java Fri Apr 16 14:00:23 2010
@@ -46,160 +46,165 @@ import org.apache.chemistry.opencmis.inm
  */
 public class CmisInMemorySpi extends CmisInMemoryProvider implements CmisSpi {
 
-  // private static Log log = LogFactory.getLog(CmisInMemorySpi.class);
-  private Session fSession;
-  
-  CmisInMemorySpi(Session session) { // package visibility
-    fSession = session;
-    setup();
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getRepositoryService()
-   */
-  public RepositoryService getRepositoryService() {
-    return fRepositoryService;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPIFactory#getSPIInstance(org.apache.opencmis.client.
-   * provider.spi.Session)
-   */
-  public CmisSpi getSpiInstance(Session session) {
-    fSession = session;
-    setup();
-    return this;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getACLService()
-   */
-  public AclService getAclService() {
-    // TODO to be completed if ACLs are implemented
-    return null;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getDiscoveryService()
-   */
-  public DiscoveryService getDiscoveryService() {
-    // TODO to be completed if query is implemented
-    return null;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getMultiFilingService()
-   */
-  public MultiFilingService getMultiFilingService() {
-    return fMultiService;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getNavigationService()
-   */
-  public NavigationService getNavigationService() {
-    return fNavigationService;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getObjectService()
-   */
-  public ObjectService getObjectService() {
-    return fObjectService;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getPolicyService()
-   */
-  public PolicyService getPolicyService() {
-    // TODO to be completed if policies are implemented
-    return null;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getRelationshipService()
-   */
-  public RelationshipService getRelationshipService() {
-    // TODO to be completed if relationships are implemented
-    return null;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#getVersioningService()
-   */
-  public VersioningService getVersioningService() {
-    return fVersioningService;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#clearAllCaches()
-   */
-  public void clearAllCaches() {
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.spi.CMISSPI#clearRepositoryCache(java.lang.String)
-   */
-  public void clearRepositoryCache(String repositoryId) {
-  }
-
-  
-  /**
-   * Returns the repository info.
-   */
-  public RepositoryInfo getRepositoryInfo() {
-    return fRepositoryInfo;
-  }
-
-  public String getStoredObjectFactoryName() {
-    return StoreManagerImpl.class.getName();
-  }
-  
-  public StoreManager getStoreManager() {
+	// private static Log log = LogFactory.getLog(CmisInMemorySpi.class);
+	private Session fSession;
+
+	CmisInMemorySpi(Session session) { // package visibility
+		fSession = session;
+		setup();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.spi.CMISSPI#getRepositoryService()
+	 */
+	public RepositoryService getRepositoryService() {
+		return fRepositoryService;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.spi.CMISSPIFactory#getSPIInstance
+	 * (org.apache.opencmis.client. provider.spi.Session)
+	 */
+	public CmisSpi getSpiInstance(Session session) {
+		fSession = session;
+		setup();
+		return this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.opencmis.client.provider.spi.CMISSPI#getACLService()
+	 */
+	public AclService getAclService() {
+		// TODO to be completed if ACLs are implemented
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.spi.CMISSPI#getDiscoveryService()
+	 */
+	public DiscoveryService getDiscoveryService() {
+		// TODO to be completed if query is implemented
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.spi.CMISSPI#getMultiFilingService()
+	 */
+	public MultiFilingService getMultiFilingService() {
+		return fMultiService;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.spi.CMISSPI#getNavigationService()
+	 */
+	public NavigationService getNavigationService() {
+		return fNavigationService;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.opencmis.client.provider.spi.CMISSPI#getObjectService()
+	 */
+	public ObjectService getObjectService() {
+		return fObjectService;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.opencmis.client.provider.spi.CMISSPI#getPolicyService()
+	 */
+	public PolicyService getPolicyService() {
+		// TODO to be completed if policies are implemented
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.spi.CMISSPI#getRelationshipService()
+	 */
+	public RelationshipService getRelationshipService() {
+		// TODO to be completed if relationships are implemented
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.spi.CMISSPI#getVersioningService()
+	 */
+	public VersioningService getVersioningService() {
+		return fVersioningService;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.opencmis.client.provider.spi.CMISSPI#clearAllCaches()
+	 */
+	public void clearAllCaches() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.spi.CMISSPI#clearRepositoryCache(
+	 * java.lang.String)
+	 */
+	public void clearRepositoryCache(String repositoryId) {
+	}
+
+	/**
+	 * Returns the repository info.
+	 */
+	public RepositoryInfo getRepositoryInfo() {
+		return fRepositoryInfo;
+	}
+
+	public String getStoredObjectFactoryName() {
+		return StoreManagerImpl.class.getName();
+	}
+
+	public StoreManager getStoreManager() {
 		return fStoreManager;
 	}
 
-  // ---- internal ----
-    
-  private void setup() {
-    Map<String, String> cfgParams = new HashMap<String, String>();
-    String[] configParamKeys = {ConfigConstants.REPOSITORY_CLASS, ConfigConstants.REPOSITORY_ID, 
-        ConfigConstants.TYPE_CREATOR_CLASS };
-
-    
-    for (String key : configParamKeys) {
-      String value = (String) fSession.get(key);
-      if (null != value)
-        cfgParams.put(key, value);
-    }
-    
+	// ---- internal ----
 
-    super.setup(cfgParams);
-  }
+	private void setup() {
+		Map<String, String> cfgParams = new HashMap<String, String>();
+		String[] configParamKeys = { ConfigConstants.REPOSITORY_CLASS, ConfigConstants.REPOSITORY_ID,
+				ConfigConstants.TYPE_CREATOR_CLASS };
+
+		for (String key : configParamKeys) {
+			String value = (String) fSession.get(key);
+			if (null != value)
+				cfgParams.put(key, value);
+		}
+
+		super.setup(cfgParams);
+	}
 
-  
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemorySpiFactory.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemorySpiFactory.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemorySpiFactory.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/CmisInMemorySpiFactory.java Fri Apr 16 14:00:23 2010
@@ -27,26 +27,27 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.client.bindings.spi.Session;
 
 /**
- * Factory class for an in-memory SMIS SPI. For the in-memory implementation the 
+ * Factory class for an in-memory SMIS SPI. For the in-memory implementation the
  * CMIS SPI creates one instance per session
  * 
  * @author Jens
- *
+ * 
  */
 public class CmisInMemorySpiFactory implements CmisSpiFactory {
 
-  private static Map<Integer, CmisInMemorySpi> IN_MEM_SPIS = new HashMap<Integer, CmisInMemorySpi>();
-  public CmisSpi getSpiInstance(Session session) {
-    // we maintain one InMemory SPI for each session
-    
-    int sessionId = System.identityHashCode(session);
-    CmisInMemorySpi spi = IN_MEM_SPIS.get(sessionId);
-    if (null == spi) {
-      // does not yet exist, create one:
-      spi = new CmisInMemorySpi(session);
-      IN_MEM_SPIS.put(sessionId, spi);
-    }
-    return spi;
-  }
+	private static Map<Integer, CmisInMemorySpi> IN_MEM_SPIS = new HashMap<Integer, CmisInMemorySpi>();
+
+	public CmisSpi getSpiInstance(Session session) {
+		// we maintain one InMemory SPI for each session
+
+		int sessionId = System.identityHashCode(session);
+		CmisInMemorySpi spi = IN_MEM_SPIS.get(sessionId);
+		if (null == spi) {
+			// does not yet exist, create one:
+			spi = new CmisInMemorySpi(session);
+			IN_MEM_SPIS.put(sessionId, spi);
+		}
+		return spi;
+	}
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/DiscoveryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/DiscoveryServiceImpl.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/DiscoveryServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/DiscoveryServiceImpl.java Fri Apr 16 14:00:23 2010
@@ -27,29 +27,27 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
 import org.apache.chemistry.opencmis.inmemory.server.InMemoryDiscoveryServiceImpl;
 
-public class DiscoveryServiceImpl  extends AbstractService implements DiscoveryService {
+public class DiscoveryServiceImpl extends AbstractService implements DiscoveryService {
 
-  private InMemoryDiscoveryServiceImpl fDiscoverySvc;
+	private InMemoryDiscoveryServiceImpl fDiscoverySvc;
 
-  public DiscoveryServiceImpl(InMemoryDiscoveryServiceImpl disSvc) {
-    fDiscoverySvc = disSvc;
-  }
-
-  public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken,
-      Boolean includeProperties, String filter, Boolean includePolicyIds, Boolean includeAcl,
-      BigInteger maxItems, ExtensionsData extension) {
-
-    return fDiscoverySvc.getContentChanges(fDummyCallContext, repositoryId, changeLogToken,
-        includeProperties, filter, includePolicyIds, includeAcl, maxItems, extension, null);
-  }
-
-  public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
-      Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-      String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-
-    return fDiscoverySvc.query(fDummyCallContext, repositoryId, statement, searchAllVersions,
-        includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount,
-        extension);
-  }
+	public DiscoveryServiceImpl(InMemoryDiscoveryServiceImpl disSvc) {
+		fDiscoverySvc = disSvc;
+	}
+
+	public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
+			String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension) {
+
+		return fDiscoverySvc.getContentChanges(fDummyCallContext, repositoryId, changeLogToken, includeProperties,
+				filter, includePolicyIds, includeAcl, maxItems, extension, null);
+	}
+
+	public ObjectList query(String repositoryId, String statement, Boolean searchAllVersions,
+			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+
+		return fDiscoverySvc.query(fDummyCallContext, repositoryId, statement, searchAllVersions,
+				includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount, extension);
+	}
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/DummyCallContext.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/DummyCallContext.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/DummyCallContext.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/DummyCallContext.java Fri Apr 16 14:00:23 2010
@@ -6,35 +6,35 @@ import java.util.Map;
 import org.apache.chemistry.opencmis.server.spi.CallContext;
 
 public class DummyCallContext implements CallContext {
-  private Map<String, String> fParameter = new HashMap<String, String>();
+	private Map<String, String> fParameter = new HashMap<String, String>();
 
-  public DummyCallContext() {
-    fParameter.put( USERNAME, "TestUser");
-    fParameter.put( PASSWORD, "secret");
-    fParameter.put( LOCALE, "en");
-  }
-  
-  public String get(String key) {
-    return fParameter.get(key);
-  }
-
-  public String getBinding() {
-    return BINDING_ATOMPUB;
-  }
-
-  public String getLocale() {
-    return get(LOCALE);
-  }
-
-  public String getPassword() {
-    return get(PASSWORD);
-  }
-
-  public String getUsername() {
-    return get(USERNAME);
-  }
-
-  public void put(String key, String value) {
-    fParameter.put(key, value);
-  }
+	public DummyCallContext() {
+		fParameter.put(USERNAME, "TestUser");
+		fParameter.put(PASSWORD, "secret");
+		fParameter.put(LOCALE, "en");
+	}
+
+	public String get(String key) {
+		return fParameter.get(key);
+	}
+
+	public String getBinding() {
+		return BINDING_ATOMPUB;
+	}
+
+	public String getLocale() {
+		return get(LOCALE);
+	}
+
+	public String getPassword() {
+		return get(PASSWORD);
+	}
+
+	public String getUsername() {
+		return get(USERNAME);
+	}
+
+	public void put(String key, String value) {
+		fParameter.put(key, value);
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/MultiFilingServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/MultiFilingServiceImpl.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/MultiFilingServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/MultiFilingServiceImpl.java Fri Apr 16 14:00:23 2010
@@ -22,23 +22,22 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.api.MultiFilingService;
 import org.apache.chemistry.opencmis.inmemory.server.InMemoryMultiFilingServiceImpl;
 
-public class MultiFilingServiceImpl  extends AbstractService implements MultiFilingService {
+public class MultiFilingServiceImpl extends AbstractService implements MultiFilingService {
 
-  private InMemoryMultiFilingServiceImpl fMultiSvc;
+	private InMemoryMultiFilingServiceImpl fMultiSvc;
 
-  public MultiFilingServiceImpl(InMemoryMultiFilingServiceImpl multiSvc) {
-    fMultiSvc = multiSvc;
-  }
+	public MultiFilingServiceImpl(InMemoryMultiFilingServiceImpl multiSvc) {
+		fMultiSvc = multiSvc;
+	}
 
-  public void addObjectToFolder(String repositoryId, String objectId, String folderId,
-      Boolean allVersions, ExtensionsData extension) {
+	public void addObjectToFolder(String repositoryId, String objectId, String folderId, Boolean allVersions,
+			ExtensionsData extension) {
 
-    fMultiSvc.addObjectToFolder(fDummyCallContext, repositoryId, objectId, folderId, allVersions, extension, null);
-  }
+		fMultiSvc.addObjectToFolder(fDummyCallContext, repositoryId, objectId, folderId, allVersions, extension, null);
+	}
 
-  public void removeObjectFromFolder(String repositoryId, String objectId, String folderId,
-      ExtensionsData extension) {
-    
-    fMultiSvc.removeObjectFromFolder(fDummyCallContext, repositoryId, objectId, folderId, extension, null);    
-  }
+	public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
+
+		fMultiSvc.removeObjectFromFolder(fDummyCallContext, repositoryId, objectId, folderId, extension, null);
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/NavigationServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/NavigationServiceImpl.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/NavigationServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/NavigationServiceImpl.java Fri Apr 16 14:00:23 2010
@@ -38,64 +38,54 @@ import org.apache.chemistry.opencmis.inm
  */
 
 public class NavigationServiceImpl extends AbstractService implements NavigationService {
-  private InMemoryNavigationServiceImpl fNavSvc;
+	private InMemoryNavigationServiceImpl fNavSvc;
 
-  public NavigationServiceImpl(InMemoryNavigationServiceImpl navSvc) {
-    fNavSvc = navSvc;
-  }
-
-  public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter,
-      String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-      String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-
-    return fNavSvc.getCheckedOutDocs(fDummyCallContext, repositoryId, folderId, filter, orderBy,
-        includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount,
-        extension, null);
-  }
-
-  public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter,
-      String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-      String renditionFilter, Boolean includePathSegment, BigInteger maxItems,
-      BigInteger skipCount, ExtensionsData extension) {
-
-    return fNavSvc.getChildren(fDummyCallContext, repositoryId, folderId, filter, orderBy,
-        includeAllowableActions, includeRelationships, renditionFilter, includePathSegment,
-        maxItems, skipCount, extension, null);
-  }
-
-  public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId,
-      BigInteger depth, String filter, Boolean includeAllowableActions,
-      IncludeRelationships includeRelationships, String renditionFilter,
-      Boolean includePathSegment, ExtensionsData extension) {
-
-    return fNavSvc.getDescendants(fDummyCallContext, repositoryId, folderId, depth, filter,
-        includeAllowableActions, includeRelationships, renditionFilter, includePathSegment,
-        extension, null);
-  }
-
-  public ObjectData getFolderParent(String repositoryId, String folderId, String filter,
-      ExtensionsData extension) {
-
-    return fNavSvc.getFolderParent(fDummyCallContext, repositoryId, folderId, filter, extension,
-        null);
-  }
-
-  public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId,
-      BigInteger depth, String filter, Boolean includeAllowableActions,
-      IncludeRelationships includeRelationships, String renditionFilter,
-      Boolean includePathSegment, ExtensionsData extension) {
-
-    return fNavSvc.getDescendants(fDummyCallContext, repositoryId, folderId, depth, filter,
-        includeAllowableActions, includeRelationships, renditionFilter, includePathSegment,
-        extension, null);
-  }
-
-  public List<ObjectParentData> getObjectParents(String repositoryId, String objectId,
-      String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-      String renditionFilter, Boolean includeRelativePathSegment, ExtensionsData extension) {
-
-    return fNavSvc.getObjectParents(fDummyCallContext, repositoryId, objectId, filter,
-        includeAllowableActions, includeRelationships, renditionFilter, includeRelativePathSegment,
-        extension, null);
-  }
+	public NavigationServiceImpl(InMemoryNavigationServiceImpl navSvc) {
+		fNavSvc = navSvc;
+	}
+
+	public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
+			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+
+		return fNavSvc.getCheckedOutDocs(fDummyCallContext, repositoryId, folderId, filter, orderBy,
+				includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount, extension, null);
+	}
+
+	public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
+			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+			Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+
+		return fNavSvc.getChildren(fDummyCallContext, repositoryId, folderId, filter, orderBy, includeAllowableActions,
+				includeRelationships, renditionFilter, includePathSegment, maxItems, skipCount, extension, null);
+	}
+
+	public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
+			String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+			String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+
+		return fNavSvc.getDescendants(fDummyCallContext, repositoryId, folderId, depth, filter,
+				includeAllowableActions, includeRelationships, renditionFilter, includePathSegment, extension, null);
+	}
+
+	public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
+
+		return fNavSvc.getFolderParent(fDummyCallContext, repositoryId, folderId, filter, extension, null);
+	}
+
+	public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
+			String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+			String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+
+		return fNavSvc.getDescendants(fDummyCallContext, repositoryId, folderId, depth, filter,
+				includeAllowableActions, includeRelationships, renditionFilter, includePathSegment, extension, null);
+	}
+
+	public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
+			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+			Boolean includeRelativePathSegment, ExtensionsData extension) {
+
+		return fNavSvc.getObjectParents(fDummyCallContext, repositoryId, objectId, filter, includeAllowableActions,
+				includeRelationships, renditionFilter, includeRelativePathSegment, extension, null);
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/ObjectServiceImpl.java Fri Apr 16 14:00:23 2010
@@ -39,120 +39,124 @@ import org.apache.chemistry.opencmis.inm
 
 public class ObjectServiceImpl extends AbstractService implements ObjectService {
 
-  private InMemoryObjectServiceImpl fObjSvc;
+	private InMemoryObjectServiceImpl fObjSvc;
+
+	public ObjectServiceImpl(InMemoryObjectServiceImpl objSvc) {
+		fObjSvc = objSvc;
+	}
+
+	public String createDocument(String repositoryId, Properties properties, String folderId,
+			ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
+			Acl removeAces, ExtensionsData extension) {
+
+		return fObjSvc.createDocument(fDummyCallContext, repositoryId, properties, folderId, contentStream,
+				versioningState, policies, addAces, removeAces, extension);
+	}
+
+	public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
+			String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces,
+			ExtensionsData extension) {
+
+		return fObjSvc.createDocumentFromSource(fDummyCallContext, repositoryId, sourceId, properties, folderId,
+				versioningState, policies, addAces, removeAces, extension);
+	}
+
+	public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
+			Acl addAces, Acl removeAces, ExtensionsData extension) {
+
+		return fObjSvc.createFolder(fDummyCallContext, repositoryId, properties, folderId, policies, addAces,
+				removeAces, extension);
+	}
+
+	public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
+			Acl addAces, Acl removeAces, ExtensionsData extension) {
+
+		return fObjSvc.createPolicy(fDummyCallContext, repositoryId, properties, folderId, policies, addAces,
+				removeAces, extension);
+	}
+
+	public String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addAces,
+			Acl removeAces, ExtensionsData extension) {
+
+		return fObjSvc.createRelationship(fDummyCallContext, repositoryId, properties, policies, addAces, removeAces,
+				extension);
+	}
+
+	public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+			ExtensionsData extension) {
+
+		fObjSvc.deleteContentStream(fDummyCallContext, repositoryId, objectId, changeToken, extension);
+	}
+
+	public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
+
+		fObjSvc.deleteObjectOrCancelCheckOut(fDummyCallContext, repositoryId, objectId, allVersions, extension);
+	}
+
+	public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
+			UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
+
+		return fObjSvc.deleteTree(fDummyCallContext, repositoryId, folderId, allVersions, unfileObjects,
+				continueOnFailure, extension);
+	}
+
+	public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
+
+		return fObjSvc.getAllowableActions(fDummyCallContext, repositoryId, objectId, extension);
+	}
+
+	public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
+			BigInteger length, ExtensionsData extension) {
+
+		return fObjSvc.getContentStream(fDummyCallContext, repositoryId, objectId, streamId, offset, length, extension);
+	}
+
+	public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
+			IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+			Boolean includeAcl, ExtensionsData extension) {
+
+		return fObjSvc.getObject(fDummyCallContext, repositoryId, objectId, filter, includeAllowableActions,
+				includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension, null);
+	}
+
+	public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
+			IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+			Boolean includeAcl, ExtensionsData extension) {
+
+		return fObjSvc.getObjectByPath(fDummyCallContext, repositoryId, path, filter, includeAllowableActions,
+				includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension, null);
+	}
+
+	public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
+
+		return fObjSvc.getProperties(fDummyCallContext, repositoryId, objectId, filter, extension);
+	}
+
+	public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
+			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+
+		return fObjSvc.getRenditions(fDummyCallContext, repositoryId, objectId, renditionFilter, maxItems, skipCount,
+				extension);
+	}
+
+	public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
+			ExtensionsData extension) {
+
+		fObjSvc.moveObject(fDummyCallContext, repositoryId, objectId, targetFolderId, sourceFolderId, extension, null);
+	}
+
+	public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
+			Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
+
+		fObjSvc.setContentStream(fDummyCallContext, repositoryId, objectId, overwriteFlag, changeToken, contentStream,
+				extension);
+	}
+
+	public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+			Properties properties, ExtensionsData extension) {
+
+		fObjSvc.updateProperties(fDummyCallContext, repositoryId, objectId, changeToken, properties, null, extension,
+				null);
+	}
 
-  public ObjectServiceImpl(InMemoryObjectServiceImpl objSvc) {
-    fObjSvc = objSvc;
-  }
-
-  public String createDocument(String repositoryId, Properties properties, String folderId,
-      ContentStream contentStream, VersioningState versioningState, List<String> policies,
-      Acl addAces, Acl removeAces, ExtensionsData extension) {
-    
-    return fObjSvc.createDocument(fDummyCallContext, repositoryId, properties, folderId, contentStream, versioningState, policies, addAces, removeAces, extension);
-  }
-
-  public String createDocumentFromSource(String repositoryId, String sourceId,
-      Properties properties, String folderId, VersioningState versioningState,
-      List<String> policies, Acl addAces, Acl removeAces,
-      ExtensionsData extension) {
-    
-    return fObjSvc.createDocumentFromSource(fDummyCallContext, repositoryId, sourceId, properties, folderId, versioningState, policies, addAces, removeAces, extension);
-  }
-
-  public String createFolder(String repositoryId, Properties properties, String folderId,
-      List<String> policies, Acl addAces, Acl removeAces,
-      ExtensionsData extension) {
-    
-    return fObjSvc.createFolder(fDummyCallContext, repositoryId, properties, folderId, policies, addAces, removeAces, extension);
-  }
-
-  public String createPolicy(String repositoryId, Properties properties, String folderId,
-      List<String> policies, Acl addAces, Acl removeAces,
-      ExtensionsData extension) {
-    
-    return fObjSvc.createPolicy(fDummyCallContext, repositoryId, properties, folderId, policies, addAces, removeAces, extension);
-  }
-
-  public String createRelationship(String repositoryId, Properties properties,
-      List<String> policies, Acl addAces, Acl removeAces,
-      ExtensionsData extension) {
-    
-    return fObjSvc.createRelationship(fDummyCallContext, repositoryId, properties, policies, addAces, removeAces, extension);
-  }
-
-  public void deleteContentStream(String repositoryId, Holder<String> objectId,
-      Holder<String> changeToken, ExtensionsData extension) {
-    
-    fObjSvc.deleteContentStream(fDummyCallContext, repositoryId, objectId, changeToken, extension);
-  }
-
-  public void deleteObject(String repositoryId, String objectId, Boolean allVersions,
-      ExtensionsData extension) {
-    
-    fObjSvc.deleteObjectOrCancelCheckOut(fDummyCallContext, repositoryId, objectId, allVersions, extension);
-  }
-
-  public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
-      UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
-    
-    return fObjSvc.deleteTree(fDummyCallContext, repositoryId, folderId, allVersions, unfileObjects, continueOnFailure, extension);
-  }
-
-  public AllowableActions getAllowableActions(String repositoryId, String objectId,
-      ExtensionsData extension) {
-    
-    return fObjSvc.getAllowableActions(fDummyCallContext, repositoryId, objectId, extension);
-  }
-
-  public ContentStream getContentStream(String repositoryId, String objectId, String streamId,
-      BigInteger offset, BigInteger length, ExtensionsData extension) {
-    
-    return fObjSvc.getContentStream(fDummyCallContext, repositoryId, objectId, streamId, offset, length, extension);
-  }
-
-  public ObjectData getObject(String repositoryId, String objectId, String filter,
-      Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-      String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) {
-    
-    return fObjSvc.getObject(fDummyCallContext, repositoryId, objectId, filter, includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension, null);
-  }
-
-  public ObjectData getObjectByPath(String repositoryId, String path, String filter,
-      Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-      String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) {
-    
-    return fObjSvc.getObjectByPath(fDummyCallContext, repositoryId, path, filter, includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension, null);
-  }
-
-  public Properties getProperties(String repositoryId, String objectId, String filter,
-      ExtensionsData extension) {
-    
-    return fObjSvc.getProperties(fDummyCallContext, repositoryId, objectId, filter, extension);
-  }
-
-  public List<RenditionData> getRenditions(String repositoryId, String objectId,
-      String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-    
-    return fObjSvc.getRenditions(fDummyCallContext, repositoryId, objectId, renditionFilter, maxItems, skipCount, extension);
-  }
-
-  public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId,
-      String sourceFolderId, ExtensionsData extension) {
-
-    fObjSvc.moveObject(fDummyCallContext, repositoryId, objectId, targetFolderId, sourceFolderId, extension, null);    
-  }
-
-  public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
-      Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
-    
-    fObjSvc.setContentStream(fDummyCallContext, repositoryId, objectId, overwriteFlag, changeToken, contentStream, extension);
-  }
-
-  public void updateProperties(String repositoryId, Holder<String> objectId,
-      Holder<String> changeToken, Properties properties, ExtensionsData extension) {
-    
-    fObjSvc.updateProperties(fDummyCallContext, repositoryId, objectId, changeToken, properties, null, extension, null);    
-  }
-  
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/RepositoryServiceImpl.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/RepositoryServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/RepositoryServiceImpl.java Fri Apr 16 14:00:23 2010
@@ -35,75 +35,82 @@ import org.apache.chemistry.opencmis.inm
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
  * 
  */
-public class RepositoryServiceImpl  extends AbstractService implements RepositoryService {
+public class RepositoryServiceImpl extends AbstractService implements RepositoryService {
 
-  private InMemoryRepositoryServiceImpl fRepSvc;
-  /**
-   * Constructor.
-   */
-  public RepositoryServiceImpl(InMemoryRepositoryServiceImpl repSvc) {
-    fRepSvc = repSvc;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfo(java.lang.String,
-   * org.apache.opencmis.client.provider.ExtensionsData)
-   */
-  public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
-
-    return fRepSvc.getRepositoryInfo(fDummyCallContext, repositoryId, extension);
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfos(boolean,
-   * org.apache.opencmis.client.provider.ExtensionsData)
-   */
-  public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
-    return fRepSvc.getRepositoryInfos(fDummyCallContext, extension);
-  }
-  
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryService#getTypeChildren(java.lang.String,
-   * java.lang.String, java.lang.Boolean, java.math.BigInteger, java.math.BigInteger,
-   * org.apache.opencmis.client.provider.ExtensionsData)
-   */
-  public TypeDefinitionList getTypeChildren(String repositoryId, String typeId,
-      Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount,
-      ExtensionsData extension) {
-
-    return fRepSvc.getTypeChildren(fDummyCallContext, repositoryId, typeId, includePropertyDefinitions, maxItems, skipCount, extension);
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryService#getTypeDefinition(java.lang.String,
-   * java.lang.String, org.apache.opencmis.client.provider.ExtensionsData)
-   */
-  public TypeDefinition getTypeDefinition(String repositoryId, String typeId,
-      ExtensionsData extension) {
-    
-    return fRepSvc.getTypeDefinition(fDummyCallContext, repositoryId, typeId, extension);
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryService#getTypeDescendants(java.lang.String,
-   * java.lang.String, java.math.BigInteger, java.lang.Boolean,
-   * org.apache.opencmis.client.provider.ExtensionsData)
-   */
-  public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId,
-      BigInteger depth, Boolean includePropertyDefinitions, ExtensionsData extension) {
-    
-    return fRepSvc.getTypeDescendants(fDummyCallContext, repositoryId, typeId, depth, includePropertyDefinitions, extension);
-  }
+	private InMemoryRepositoryServiceImpl fRepSvc;
+
+	/**
+	 * Constructor.
+	 */
+	public RepositoryServiceImpl(InMemoryRepositoryServiceImpl repSvc) {
+		fRepSvc = repSvc;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfo
+	 * (java.lang.String, org.apache.opencmis.client.provider.ExtensionsData)
+	 */
+	public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
+
+		return fRepSvc.getRepositoryInfo(fDummyCallContext, repositoryId, extension);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfos
+	 * (boolean, org.apache.opencmis.client.provider.ExtensionsData)
+	 */
+	public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
+		return fRepSvc.getRepositoryInfos(fDummyCallContext, extension);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.RepositoryService#getTypeChildren
+	 * (java.lang.String, java.lang.String, java.lang.Boolean,
+	 * java.math.BigInteger, java.math.BigInteger,
+	 * org.apache.opencmis.client.provider.ExtensionsData)
+	 */
+	public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
+			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+
+		return fRepSvc.getTypeChildren(fDummyCallContext, repositoryId, typeId, includePropertyDefinitions, maxItems,
+				skipCount, extension);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.RepositoryService#getTypeDefinition
+	 * (java.lang.String, java.lang.String,
+	 * org.apache.opencmis.client.provider.ExtensionsData)
+	 */
+	public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+
+		return fRepSvc.getTypeDefinition(fDummyCallContext, repositoryId, typeId, extension);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.RepositoryService#getTypeDescendants
+	 * (java.lang.String, java.lang.String, java.math.BigInteger,
+	 * java.lang.Boolean, org.apache.opencmis.client.provider.ExtensionsData)
+	 */
+	public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
+			Boolean includePropertyDefinitions, ExtensionsData extension) {
+
+		return fRepSvc.getTypeDescendants(fDummyCallContext, repositoryId, typeId, depth, includePropertyDefinitions,
+				extension);
+	}
 
- 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/clientprovider/VersioningServiceImpl.java Fri Apr 16 14:00:23 2010
@@ -32,61 +32,58 @@ import org.apache.chemistry.opencmis.inm
 
 public class VersioningServiceImpl extends AbstractService implements VersioningService {
 
-  private InMemoryVersioningServiceImpl fVersioningSvc;
+	private InMemoryVersioningServiceImpl fVersioningSvc;
 
-  public VersioningServiceImpl(InMemoryVersioningServiceImpl verSvc) {
-    fVersioningSvc = verSvc;
-  }
-
-  public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
-
-    fVersioningSvc.cancelCheckOut(fDummyCallContext, repositoryId, objectId, extension);
-  }
-
-  public void checkIn(String repositoryId, Holder<String> objectId, Boolean major,
-      Properties properties, ContentStream contentStream, String checkinComment,
-      List<String> policies, Acl addAces, Acl removeAces,
-      ExtensionsData extension) {
-
-    fVersioningSvc.checkIn(fDummyCallContext, repositoryId, objectId, major, properties,
-        contentStream, checkinComment, policies, addAces, removeAces, extension, null);
-  }
-
-  public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
-      Holder<Boolean> contentCopied) {
-
-    fVersioningSvc.checkOut(fDummyCallContext, repositoryId, objectId, extension, contentCopied,
-        null);
-  }
-
-  public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId,
-      String filter, Boolean includeAllowableActions, ExtensionsData extension) {
-
-    return getAllVersions(repositoryId, versionSeriesId, filter, includeAllowableActions, extension);
-  }
-  
-  public List<ObjectData> getAllVersions(String repositoryId, String versionSeriesId,
-      String filter, Boolean includeAllowableActions, ExtensionsData extension) {
-
-    return fVersioningSvc.getAllVersions(fDummyCallContext, repositoryId, versionSeriesId, filter,
-        includeAllowableActions, extension, null);
-  }
-
-  public ObjectData getObjectOfLatestVersion(String repositoryId, String versionSeriesId,
-      Boolean major, String filter, Boolean includeAllowableActions,
-      IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
-      Boolean includeAcl, ExtensionsData extension) {
-
-    return fVersioningSvc.getObjectOfLatestVersion(fDummyCallContext, repositoryId,
-        versionSeriesId, major, filter, includeAllowableActions, includeRelationships,
-        renditionFilter, includePolicyIds, includeAcl, extension, null);
-  }
-
-  public Properties getPropertiesOfLatestVersion(String repositoryId, String versionSeriesId,
-      Boolean major, String filter, ExtensionsData extension) {
-
-    return fVersioningSvc.getPropertiesOfLatestVersion(fDummyCallContext, repositoryId,
-        versionSeriesId, major, filter, extension);
-  }
+	public VersioningServiceImpl(InMemoryVersioningServiceImpl verSvc) {
+		fVersioningSvc = verSvc;
+	}
+
+	public void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension) {
+
+		fVersioningSvc.cancelCheckOut(fDummyCallContext, repositoryId, objectId, extension);
+	}
+
+	public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties,
+			ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces,
+			ExtensionsData extension) {
+
+		fVersioningSvc.checkIn(fDummyCallContext, repositoryId, objectId, major, properties, contentStream,
+				checkinComment, policies, addAces, removeAces, extension, null);
+	}
+
+	public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
+			Holder<Boolean> contentCopied) {
+
+		fVersioningSvc.checkOut(fDummyCallContext, repositoryId, objectId, extension, contentCopied, null);
+	}
+
+	public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
+			Boolean includeAllowableActions, ExtensionsData extension) {
+
+		return getAllVersions(repositoryId, versionSeriesId, filter, includeAllowableActions, extension);
+	}
+
+	public List<ObjectData> getAllVersions(String repositoryId, String versionSeriesId, String filter,
+			Boolean includeAllowableActions, ExtensionsData extension) {
+
+		return fVersioningSvc.getAllVersions(fDummyCallContext, repositoryId, versionSeriesId, filter,
+				includeAllowableActions, extension, null);
+	}
+
+	public ObjectData getObjectOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
+			String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+			String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension) {
+
+		return fVersioningSvc.getObjectOfLatestVersion(fDummyCallContext, repositoryId, versionSeriesId, major, filter,
+				includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeAcl,
+				extension, null);
+	}
+
+	public Properties getPropertiesOfLatestVersion(String repositoryId, String versionSeriesId, Boolean major,
+			String filter, ExtensionsData extension) {
+
+		return fVersioningSvc.getPropertiesOfLatestVersion(fDummyCallContext, repositoryId, versionSeriesId, major,
+				filter, extension);
+	}
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java?rev=934878&r1=934877&r2=934878&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java Fri Apr 16 14:00:23 2010
@@ -34,138 +34,138 @@ import org.apache.chemistry.opencmis.inm
  * Common functionality for all service implementations
  * 
  * @author Jens
- *
+ * 
  */
 public class AbstractServiceImpl {
-  
-  protected StoreManager fStoreManager;
-  
-  protected AbstractServiceImpl(StoreManager storeManager) {
-    fStoreManager = storeManager;
-  }
-  
-  /**
-   * check if repository is known and that object exists. To avoid later calls
-   * to again retrieve the object from the id return the retrieved object for 
-   * later use.
-   * 
-   * @param repositoryId
-   *    repository id
-   * @param objectId
-   *    object id
-   * @return
-   *    object for objectId
-   */
-  protected StoredObject checkStandardParameters(String repositoryId, String objectId) {
-
-    ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
-
-    if (objStore==null)
-      throw new CmisObjectNotFoundException("Unknown repository id: " + repositoryId);
-    
-    StoredObject so = objStore.getObjectById(objectId);
-    
-    if (so==null)
-      throw new CmisObjectNotFoundException("Unknown object id: " + objectId); 
-    
-    return so;
-  }
-  
-  protected StoredObject checkExistingObjectId(ObjectStore objStore, String objectId) {
-    
-    StoredObject so = objStore.getObjectById(objectId);
-    
-    if (so==null)
-      throw new CmisObjectNotFoundException("Unknown object id: " + objectId);   
-    
-    return so;
-  }
-
-  protected void checkRepositoryId(String repositoryId) {
-    ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
-
-    if (objStore==null)
-      throw new CmisObjectNotFoundException("Unknown repository id: " + repositoryId);    
-  }
-  
-  protected TypeDefinition getTypeDefinition(String repositoryId, Properties properties) {
-    String typeId = (String) properties.getProperties().get(PropertyIds.OBJECT_TYPE_ID)
-        .getFirstValue();
-    TypeDefinitionContainer typeDefC = fStoreManager.getTypeById(repositoryId, typeId);
-    if (typeDefC == null)
-      throw new RuntimeException("Cannot create object, a type with id " + typeId + " is unknown");
-    
-    return typeDefC.getTypeDefinition();
-  }
-  
-  protected TypeDefinition getTypeDefinition(String repositoryId, StoredObject obj) {
-    
-    TypeDefinitionContainer typeDefC = fStoreManager.getTypeById(repositoryId, obj.getTypeId());
-    return typeDefC.getTypeDefinition();
-  }
-  
-  /**
-   * We allow checkin, cancel, checkout operations on a single version as well as on a version series
-   * This method returns the versioned document (version series) in each case
-   * @param value
-   *    version or version series id of a document
-   * @return
-   *    version series id
-   */
-  protected VersionedDocument getVersionedDocumentOfObjectId(StoredObject so) {
-    
-    VersionedDocument verDoc;
-    if (so instanceof DocumentVersion) {
-      // get document the version is contained in to c
-      verDoc = ((DocumentVersion) so).getParentDocument();
-    } else {
-      verDoc = (VersionedDocument) so;
-    }
-
-    return verDoc;
-  }
-  
-  protected VersionedDocument testIsNotCheckedOutBySomeoneElse(StoredObject so, String user) {
-    checkIsVersionableObject(so);
-    VersionedDocument verDoc = getVersionedDocumentOfObjectId(so);
-    if (verDoc.isCheckedOut())
-      testCheckedOutByCurrentUser(user, verDoc);
-      
-    return verDoc;
-  }
-  
-  protected VersionedDocument testHasProperCheckedOutStatus(StoredObject so, String user) {
-    
-    checkIsVersionableObject(so);
-    VersionedDocument verDoc = getVersionedDocumentOfObjectId(so);
-
-    checkHasUser(user);
-    
-    testIsCheckedOut(verDoc);
-    testCheckedOutByCurrentUser(user, verDoc);
-    
-    return verDoc;
-  }
-  
-  protected void checkIsVersionableObject(StoredObject so) {
-    if (! (so instanceof VersionedDocument || so instanceof DocumentVersion))
-      throw new RuntimeException("Object is of a versionable type but not instance of VersionedDocument or DocumentVersion.");    
-  }
-  
-  protected void checkHasUser(String user) {
-    if (null == user || user.length() == 0)
-      throw new CmisUpdateConflictException("Object can't be checked-in, no user is given.");
-  }
-  
-  protected void testCheckedOutByCurrentUser(String user, VersionedDocument verDoc) {
-    if (! user.equals(verDoc.getCheckedOutBy()))
-      throw new CmisUpdateConflictException("Object can't be checked-in, user "
-          + verDoc.getCheckedOutBy() + " has checked out the document.");    
-  }
-  
-  protected void testIsCheckedOut(VersionedDocument verDoc) {
-    if (!verDoc.isCheckedOut())
-      throw new CmisUpdateConflictException("Canot check-in: Document " + verDoc.getId() + " is not checked out.");
-  }
+
+	protected StoreManager fStoreManager;
+
+	protected AbstractServiceImpl(StoreManager storeManager) {
+		fStoreManager = storeManager;
+	}
+
+	/**
+	 * check if repository is known and that object exists. To avoid later calls
+	 * to again retrieve the object from the id return the retrieved object for
+	 * later use.
+	 * 
+	 * @param repositoryId
+	 *            repository id
+	 * @param objectId
+	 *            object id
+	 * @return object for objectId
+	 */
+	protected StoredObject checkStandardParameters(String repositoryId, String objectId) {
+
+		ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
+
+		if (objStore == null)
+			throw new CmisObjectNotFoundException("Unknown repository id: " + repositoryId);
+
+		StoredObject so = objStore.getObjectById(objectId);
+
+		if (so == null)
+			throw new CmisObjectNotFoundException("Unknown object id: " + objectId);
+
+		return so;
+	}
+
+	protected StoredObject checkExistingObjectId(ObjectStore objStore, String objectId) {
+
+		StoredObject so = objStore.getObjectById(objectId);
+
+		if (so == null)
+			throw new CmisObjectNotFoundException("Unknown object id: " + objectId);
+
+		return so;
+	}
+
+	protected void checkRepositoryId(String repositoryId) {
+		ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
+
+		if (objStore == null)
+			throw new CmisObjectNotFoundException("Unknown repository id: " + repositoryId);
+	}
+
+	protected TypeDefinition getTypeDefinition(String repositoryId, Properties properties) {
+		String typeId = (String) properties.getProperties().get(PropertyIds.OBJECT_TYPE_ID).getFirstValue();
+		TypeDefinitionContainer typeDefC = fStoreManager.getTypeById(repositoryId, typeId);
+		if (typeDefC == null)
+			throw new RuntimeException("Cannot create object, a type with id " + typeId + " is unknown");
+
+		return typeDefC.getTypeDefinition();
+	}
+
+	protected TypeDefinition getTypeDefinition(String repositoryId, StoredObject obj) {
+
+		TypeDefinitionContainer typeDefC = fStoreManager.getTypeById(repositoryId, obj.getTypeId());
+		return typeDefC.getTypeDefinition();
+	}
+
+	/**
+	 * We allow checkin, cancel, checkout operations on a single version as well
+	 * as on a version series This method returns the versioned document
+	 * (version series) in each case
+	 * 
+	 * @param value
+	 *            version or version series id of a document
+	 * @return version series id
+	 */
+	protected VersionedDocument getVersionedDocumentOfObjectId(StoredObject so) {
+
+		VersionedDocument verDoc;
+		if (so instanceof DocumentVersion) {
+			// get document the version is contained in to c
+			verDoc = ((DocumentVersion) so).getParentDocument();
+		} else {
+			verDoc = (VersionedDocument) so;
+		}
+
+		return verDoc;
+	}
+
+	protected VersionedDocument testIsNotCheckedOutBySomeoneElse(StoredObject so, String user) {
+		checkIsVersionableObject(so);
+		VersionedDocument verDoc = getVersionedDocumentOfObjectId(so);
+		if (verDoc.isCheckedOut())
+			testCheckedOutByCurrentUser(user, verDoc);
+
+		return verDoc;
+	}
+
+	protected VersionedDocument testHasProperCheckedOutStatus(StoredObject so, String user) {
+
+		checkIsVersionableObject(so);
+		VersionedDocument verDoc = getVersionedDocumentOfObjectId(so);
+
+		checkHasUser(user);
+
+		testIsCheckedOut(verDoc);
+		testCheckedOutByCurrentUser(user, verDoc);
+
+		return verDoc;
+	}
+
+	protected void checkIsVersionableObject(StoredObject so) {
+		if (!(so instanceof VersionedDocument || so instanceof DocumentVersion))
+			throw new RuntimeException(
+					"Object is of a versionable type but not instance of VersionedDocument or DocumentVersion.");
+	}
+
+	protected void checkHasUser(String user) {
+		if (null == user || user.length() == 0)
+			throw new CmisUpdateConflictException("Object can't be checked-in, no user is given.");
+	}
+
+	protected void testCheckedOutByCurrentUser(String user, VersionedDocument verDoc) {
+		if (!user.equals(verDoc.getCheckedOutBy()))
+			throw new CmisUpdateConflictException("Object can't be checked-in, user " + verDoc.getCheckedOutBy()
+					+ " has checked out the document.");
+	}
+
+	protected void testIsCheckedOut(VersionedDocument verDoc) {
+		if (!verDoc.isCheckedOut())
+			throw new CmisUpdateConflictException("Canot check-in: Document " + verDoc.getId() + " is not checked out.");
+	}
 
 }



Mime
View raw message