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

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


        ObjectStore objectStore = fStoreManager.getObjectStore(repositoryId);
        StoredObject folder = sos[1];

        checkObjects(so, folder);
        Folder parent = (Folder) folder;
        MultiFiling obj = (MultiFiling) so;
        obj.removeParent(parent);

        // To be able to provide all Atom links in the response we need
        // additional information:
        if (context.isObjectInfoRequired()) {
            ObjectInfoImpl objectInfo = new ObjectInfoImpl();
View Full Code Here


            if (so instanceof SingleFiling) {
                String soPath = ((SingleFiling) so).getPath();
                if (soPath.equals(path))
                    return so;
            } else if (so instanceof MultiFiling) {
                MultiFiling mfo = (MultiFiling) so;
                List<Folder> parents = mfo.getParents();
                for (Folder parent : parents) {
                    String parentPath = parent.getPath();
                    String mfPath = parentPath.equals(Folder.PATH_SEPARATOR) ? parentPath + mfo.getPathSegment()
                            : parentPath + Folder.PATH_SEPARATOR + mfo.getPathSegment();
                    if (mfPath.equals(path))
                        return so;
                }
            } else
                return null;
View Full Code Here

                result = Collections.singletonList((ObjectParentData) parentData);
            } else
                result = Collections.emptyList();
        } else if (sop instanceof MultiFiling) {
            result = new ArrayList<ObjectParentData>();
            MultiFiling multiParentObj = (MultiFiling) sop;
            List<Folder> parents = multiParentObj.getParents();
            if (null != parents)
                for (Folder parent : parents) {
                    ObjectParentDataImpl parentData = new ObjectParentDataImpl();
                    ObjectDataImpl objData = new ObjectDataImpl();
                    copyFilteredProperties(repositoryId, parent, filter, objData);
                    parentData.setObject(objData);
                    parentData.setRelativePathSegment(multiParentObj.getPathSegment());
                    result.add(parentData);
                    if (objectInfos != null) {
                        ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                        fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, parent, objectInfo);
                        objectInfos.addObjectInfo(objectInfo);
View Full Code Here

        StoredObject so = so2[0];
        StoredObject folder = so2[1];
        checkObjects(so, folder);

        Folder newParent = (Folder) folder;
        MultiFiling obj = (MultiFiling) so;
        obj.addParent(newParent);

        if (context.isObjectInfoRequired()) {
            ObjectInfoImpl objectInfo = new ObjectInfoImpl();
            fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, so, objectInfo);
            fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, folder, objectInfo);
View Full Code Here

        ObjectStore objectStore = fStoreManager.getObjectStore(repositoryId);
        StoredObject folder = checkExistingObjectId(objectStore, folderId);

        checkObjects(so, folder);
        Folder parent = (Folder) folder;
        MultiFiling obj = (MultiFiling) so;
        obj.removeParent(parent);

        // To be able to provide all Atom links in the response we need
        // additional information:
        if (context.isObjectInfoRequired()) {
            ObjectInfoImpl objectInfo = new ObjectInfoImpl();
View Full Code Here

            if (so instanceof SingleFiling) {
                SingleFiling pathObj = (SingleFiling) so;
                pathObj.setParent(newParent);
            } else if (so instanceof MultiFiling) {
                MultiFiling pathObj = (MultiFiling) so;
                pathObj.addParent(newParent);
                pathObj.removeParent(oldParent);
            }
        } finally {
            fObjStore.unlock();
        }
    }
View Full Code Here

        StoredObject so = sos[0];
        StoredObject folder = sos[1];
        checkObjects(so, folder);

        Folder newParent = (Folder) folder;
        MultiFiling obj = (MultiFiling) so;
        obj.addParent(newParent);

        if (context.isObjectInfoRequired()) {
            ObjectInfoImpl objectInfo = new ObjectInfoImpl();
            fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, so, objectInfo);
            fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, folder, objectInfo);
View Full Code Here

        StoredObject folder = sos[1];

        checkObjects(so, folder);
        Folder parent = (Folder) folder;
        MultiFiling obj = (MultiFiling) so;
        obj.removeParent(parent);

        // To be able to provide all Atom links in the response we need
        // additional information:
        if (context.isObjectInfoRequired()) {
            ObjectInfoImpl objectInfo = new ObjectInfoImpl();
View Full Code Here

            } else {
                result = Collections.emptyList();
            }
        } else if (sop instanceof MultiFiling) {
            result = new ArrayList<ObjectParentData>();
            MultiFiling multiParentObj = (MultiFiling) sop;
            List<Folder> parents = multiParentObj.getParents(user);
            if (null != parents) {
                for (Folder parent : parents) {
                    ObjectParentDataImpl parentData = new ObjectParentDataImpl();
                    TypeDefinition typeDef = fStoreManager.getTypeById(repositoryId, parent.getTypeId()).getTypeDefinition();
                    ObjectData objData = PropertyCreationHelper.getObjectData(typeDef, parent, filter, user, includeAllowableActions,
                            includeRelationships, renditionFilter, false, true, null);

                    parentData.setObject(objData);
                    parentData.setRelativePathSegment(multiParentObj.getPathSegment());
                    result.add(parentData);
                    if (objectInfos != null) {
                        ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                        fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, parent, objectInfo);
                        objectInfos.addObjectInfo(objectInfo);
View Full Code Here

                String soPath = ((SingleFiling) so).getPath();
                if (soPath.equals(path)) {
                    return so;
                }
            } else if (so instanceof MultiFiling) {
                MultiFiling mfo = (MultiFiling) so;
                List<Folder> parents = mfo.getParents(user);
                for (Folder parent : parents) {
                    String parentPath = parent.getPath();
                    String mfPath = parentPath.equals(Folder.PATH_SEPARATOR) ? parentPath + mfo.getPathSegment()
                            : parentPath + Folder.PATH_SEPARATOR + mfo.getPathSegment();
                    if (mfPath.equals(path)) {
                        return so;
                    }
                }
            } else {
View Full Code Here

TOP

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

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.