Examples of TypeDefinition


Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

       TypeValidator.validateAcl(typeDef, addACEs, removeACEs);
    
       // validate the allowed types of the relationship
       ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);

       TypeDefinition sourceTypeDef = fStoreManager.getTypeById(repositoryId, objStore.getObjectById(sourceId).getTypeId()).getTypeDefinition();
       TypeDefinition targetTypeDef = fStoreManager.getTypeById(repositoryId, objStore.getObjectById(targetId).getTypeId()).getTypeDefinition();
       TypeValidator.validateAllowedRelationshipTypes(typeDef,  sourceTypeDef, targetTypeDef);
      
        StoredObject storedObject = objStore.createRelationship( relationObjects[0], relationObjects[1],
            propMap, user, addACEs,  removeACEs);
      return storedObject; 
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

        }
        List<ObjectData> objDataList = new ArrayList<ObjectData>();
        Map<String, String> props = queryObj.getRequestedProperties();
        Map<String, String> funcs = queryObj.getRequestedFuncs();
        for (StoredObject so : matches) {
            TypeDefinition td = tm.getTypeById(so.getTypeId()).getTypeDefinition();
            ObjectData od = PropertyCreationHelper.getObjectDataQueryResult(td, so, user, props, funcs,
                    includeAllowableActions, includeRelationships, renditionFilter);

            objDataList.add(od);
        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

        while (typeId != null) {
            if (typeId.equals(td.getId())) {
                return true;
            }
            // check parent type
            TypeDefinition parentTD = queryObj.getParentType(typeId);
            typeId = parentTD == null ? null : parentTD.getId();
        }
        return false;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

                                                                           // support
                                                                           // JOINS
                                                                           // take
                                                                           // first
                                                                           // type
        TypeDefinition td = queryObj.getTypeDefinitionFromQueryName(queryName);
        boolean skip = so instanceof VersionedDocument; // we are only
                                                        // interested in
                                                        // versions not in the
                                                        // series
        boolean typeMatches = typeMatches(td, so);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

        String user = context.getUsername();
        if (null == folderId) {
            List<StoredObject> checkedOuts = fStoreManager.getObjectStore(repositoryId).getCheckedOutDocuments(
                    orderBy, context.getUsername(), includeRelationships);
            for (StoredObject checkedOut : checkedOuts) {
                TypeDefinition td = fStoreManager.getTypeById(repositoryId, checkedOut.getTypeId()).getTypeDefinition();
//                DocumentVersion workingCopy = ((VersionedDocument) checkedOut).getPwc();
//                if (null == workingCopy)
//                  throw new CmisConstraintException("document " + checkedOut + " is checked out but has no working copy");      
                ObjectData od = PropertyCreationHelper.getObjectData(td, checkedOut, filter, user,
                        includeAllowableActions, includeRelationships, renditionFilter, false, false, extension);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

            ObjectInFolderDataImpl oifd = new ObjectInFolderDataImpl();
            if (includePathSegments != null && includePathSegments) {
                oifd.setPathSegment(spo.getName());
            }

            TypeDefinition typeDef = fStoreManager.getTypeById(repositoryId, spo.getTypeId()).getTypeDefinition();
            ObjectData objectData = PropertyCreationHelper.getObjectData(typeDef, spo, filter, user, includeAllowableActions,
                    includeRelationships, renditionFilter, false, true, null);

            oifd.setObject(objectData);
            folderList.add(oifd);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

            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, "", false, true, null);

                    parentData.setObject(objData);
                    parentData.setRelativePathSegment(multiParentObj.getPathSegment());
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

        return parent;
    }

    void copyFilteredProperties(String repositoryId, StoredObject so, String filter, ObjectDataImpl objData) {
        List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);
        TypeDefinition td = fStoreManager.getTypeById(repositoryId, so.getTypeId()).getTypeDefinition();
        Properties props = PropertyCreationHelper.getPropertiesFromObject(so, td, requestedIds, true);
        objData.setProperties(props);
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

    public void checkOut(CallContext context, String repositoryId, Holder<String> objectId,
            ExtensionsData extension, Holder<Boolean> contentCopied, ObjectInfoHandler objectInfos) {

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

        TypeDefinition typeDef = getTypeDefinition(repositoryId, so);
        if (!typeDef.getBaseTypeId().equals(BaseTypeId.CMIS_DOCUMENT)) {
            throw new CmisNotSupportedException("Only documents can be checked-out.");
        } else if (!((DocumentTypeDefinition) typeDef).isVersionable()) {
            throw new CmisNotSupportedException("Object can't be checked-out, type is not versionable.");
        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.definitions.TypeDefinition

            throw new CmisInvalidArgumentException("Object is not instance of a document (version series)");
        }

        List<String> requestedIds = FilterParser.getRequestedIdsFromFilter(filter);

        TypeDefinition td = fStoreManager.getTypeById(repositoryId, latestVersionObject.getTypeId()).getTypeDefinition();
        Properties props = PropertyCreationHelper.getPropertiesFromObject(latestVersionObject, td,
                requestedIds, true);

        return props;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.