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

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


        queryObj = new QueryObject(tm);
        processQueryAndCatchExc(statement); // calls query processor

        // iterate over all the objects and check for each if the query matches
        for (String objectId : ((ObjectStoreImpl) objectStore).getIds()) {
            StoredObject so = objectStore.getObjectById(objectId);
            match(so, user, searchAllVersions == null ? true : searchAllVersions.booleanValue());
        }

        ObjectList objList = buildResultList(tm, user, includeAllowableActions, includeRelationships, renditionFilter,
                maxItems, skipCount);
View Full Code Here


            ObjectInFolderList children = getChildrenIntern(repositoryId, folderId, filter, orderBy,
                    includeAllowableActions, includeRelationships, renditionFilter, false, -1, -1, false, context
                            .isObjectInfoRequired() ? objectInfos : null, user);
            for (ObjectInFolderData child : children.getObjects()) {
                ObjectData obj = child.getObject();
                StoredObject so = fStoreManager.getObjectStore(repositoryId).getObjectById(obj.getId());
                LOG.info("Checked out: children:" + obj.getId());
                if (so instanceof DocumentVersion && ((DocumentVersion) so).getParentDocument().isCheckedOut()) {
                    odList.add(obj);
                    if (context.isObjectInfoRequired()) {
                        ObjectInfoImpl objectInfo = new ObjectInfoImpl();
View Full Code Here

    public ObjectData getFolderParent(CallContext context, String repositoryId, String folderId, String filter,
            ExtensionsData extension, ObjectInfoHandler objectInfos) {

        LOG.debug("start getFolderParent()");

        StoredObject so = validator.getFolderParent(context, repositoryId, folderId, extension);

        Folder folder = null;
        if (so instanceof Folder) {
            folder = (Folder) so;
        } else {
View Full Code Here

            String renditionFilter, Boolean includeRelativePathSegment, ExtensionsData extension,
            ObjectInfoHandler objectInfos) {

        LOG.debug("start getObjectParents()");

        StoredObject so = validator.getObjectParents(context, repositoryId, objectId, extension);

        // for now we have only folders that have a parent and the in-memory
        // provider only has one
        // parent for each object (no multi-filing)
        List<ObjectParentData> result = null;
View Full Code Here

            String user) {

        ObjectInFolderListImpl result = new ObjectInFolderListImpl();
        List<ObjectInFolderData> folderList = new ArrayList<ObjectInFolderData>();
        ObjectStore fs = fStoreManager.getObjectStore(repositoryId);
        StoredObject so = fs.getObjectById(folderId);
        Folder folder = null;

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

        LOG.debug("start createDocument()");
        // Attach the CallContext to a thread local context that can be
        // accessed from everywhere

        StoredObject so = createDocumentIntern(context, repositoryId, properties, folderId, contentStream, versioningState,
                policies, addAces, removeAces, extension);
        LOG.debug("stop createDocument()");
        return so.getId();
    }
View Full Code Here

    public String createDocumentFromSource(CallContext context, String repositoryId, String sourceId,
            Properties properties, String folderId, VersioningState versioningState, List<String> policies,
            Acl addAces, Acl removeAces, ExtensionsData extension) {

        LOG.debug("start createDocumentFromSource()");
        StoredObject so = validator.createDocumentFromSource(context, repositoryId, sourceId, folderId, extension);
        TypeDefinition td = getTypeDefinition(repositoryId, so)// typedefinition may be copied from source object

        ContentStream content = getContentStream(context, repositoryId, sourceId, null, BigInteger.valueOf(-1),
                BigInteger.valueOf(-1), null);
View Full Code Here

    public String createPolicy(CallContext context, String repositoryId, Properties properties, String folderId,
            List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {

        // TODO to be completed if policies are implemented
        LOG.debug("start createPolicy()");
        StoredObject so = createPolicyIntern(context, repositoryId, properties, folderId, policies, addAces, removeAces,
                extension);
        LOG.debug("stop createPolicy()");
        return so == null ? null : so.getId();
    }
View Full Code Here

    public String createRelationship(CallContext context, String repositoryId, Properties properties,
            List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {

        // TODO to be completed if relationships are implemented
        LOG.debug("start createRelationship()");
        StoredObject so = createRelationshipIntern(context, repositoryId, properties, policies, addAces, removeAces, extension);
        LOG.debug("stop createRelationship()");
        return so == null ? null : so.getId();
    }
View Full Code Here

            throw new CmisInvalidArgumentException("Cannot create object, a type with id " + typeId + " is unknown");
        }

        // check if the given type is a document type
        BaseTypeId typeBaseId = typeDefC.getTypeDefinition().getBaseTypeId();
        StoredObject so = null;
        if (typeBaseId.equals(InMemoryDocumentTypeDefinition.getRootDocumentType().getBaseTypeId())) {
            so = createDocumentIntern(context, repositoryId, properties, folderId, contentStream, versioningState, null, null,
                    null, null);
        } else if (typeBaseId.equals(InMemoryFolderTypeDefinition.getRootFolderType().getBaseTypeId())) {
            so = createFolderIntern(context, repositoryId, properties, folderId, null, null, null, null);
        } else if (typeBaseId.equals(InMemoryPolicyTypeDefinition.getRootPolicyType().getBaseTypeId())) {
            so = createPolicyIntern(context, repositoryId, properties, folderId, null, null, null, null);
        } else if (typeBaseId.equals(InMemoryRelationshipTypeDefinition.getRootRelationshipType().getBaseTypeId())) {
            so = createRelationshipIntern(context, repositoryId, properties, null, null, null, null);
        } else {
            LOG.error("The type contains an unknown base object id, object can't be created");
        }

        // Make a call to getObject to convert the resulting id into an
        // ObjectData
        TypeDefinition td = typeDefC.getTypeDefinition();
        ObjectData od = PropertyCreationHelper.getObjectData(td, so, null, context.getUsername(), false,
                IncludeRelationships.NONE, null, false, false, extension);

        if (context.isObjectInfoRequired()) {
            ObjectInfoImpl objectInfo = new ObjectInfoImpl();
            fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, so, od, objectInfo);
            objectInfos.addObjectInfo(objectInfo);
        }
        return so != null ? so.getId() : null;
    }
View Full Code Here

TOP

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

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.