Package org.apache.chemistry.opencmis.inmemory.storedobj.api

Examples of org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStore


            throw new CmisInvalidArgumentException("Repository Id cannot be null.");

        if (null == objectId)
            throw new CmisInvalidArgumentException("Object Id cannot be null.");

        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;
View Full Code Here


        if (null == repositoryId)
            throw new CmisInvalidArgumentException("Repository Id cannot be null.");

        if (null != objectId) {

            ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);

            if (objStore == null)
                throw new CmisObjectNotFoundException("Unknown repository id: " + repositoryId);

            so = objStore.getObjectById(objectId);

            if (so == null)
                throw new CmisObjectNotFoundException("Unknown object id: " + objectId);
        }
View Full Code Here

    protected void checkRepositoryId(String repositoryId) {
        if (null == repositoryId)
            throw new CmisInvalidArgumentException("Repository Id cannot be null.");
       
        ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);

        if (objStore == null)
            throw new CmisInvalidArgumentException("Unknown repository id: " + repositoryId);
    }
View Full Code Here

    }

    protected StoredObject[] checkParams(String repositoryId, String objectId1, String objectId2) {
        StoredObject[] so = new StoredObject[2];
        so[0] = checkStandardParameters(repositoryId, objectId1);
        ObjectStore objectStore = fStoreManager.getObjectStore(repositoryId);
        so[1] = checkExistingObjectId(objectStore, objectId2);
        return so;
    }
View Full Code Here

     *            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;
View Full Code Here

        return rootTypes;
    }

    public RepositoryInfo getRepositoryInfo(String repositoryId) {
        ObjectStore sm = fMapRepositoryToObjectStore.get(repositoryId);
        if (null == sm)
            return null;

        RepositoryInfo repoInfo = createDefaultRepositoryInfo(repositoryId);
View Full Code Here

        typeManager.initTypeSystem(typeDefs);
    }

    private RepositoryInfo createDefaultRepositoryInfo(String repositoryId) {
        ObjectStore objStore = getObjectStore(repositoryId);
        String rootFolderId = objStore.getRootFolder().getId();
        // repository info
        RepositoryInfoImpl repoInfo;
        repoInfo = new RepositoryInfoImpl();
        repoInfo.setId(repositoryId == null ? "inMem" : repositoryId);
        repoInfo.setName("InMemory Repository");
View Full Code Here

    public ObjectList query(String user, String repositoryId, String statement, Boolean searchAllVersions,
            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
            BigInteger maxItems, BigInteger skipCount) {
        TypeManager tm = getTypeManager(repositoryId);
        ObjectStore objectStore = getObjectStore(repositoryId);

        InMemoryQueryProcessor queryProcessor = new InMemoryQueryProcessor();
        ObjectList objList = queryProcessor.query(tm, objectStore, user, repositoryId, statement, searchAllVersions,
                includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount);
View Full Code Here

        LOG.debug("Begin removeObjectFromFolder()");

        StoredObject[] sos = validator.removeObjectFromFolder(context, repositoryId, objectId, folderId, extension);
        StoredObject so = sos[0];
           
        ObjectStore objectStore = fStoreManager.getObjectStore(repositoryId);
        StoredObject folder = sos[1];

        checkObjects(so, folder);
        Folder parent = (Folder) folder;
        MultiFiling obj = (MultiFiling) so;
View Full Code Here

        return so;
    }

    protected void checkRepositoryId(String repositoryId) {
        ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);

        if (objStore == null)
            throw new CmisObjectNotFoundException("Unknown repository id: " + repositoryId);
    }
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.