Package org.apache.chemistry.opencmis.commons.enums

Examples of org.apache.chemistry.opencmis.commons.enums.VersioningState


        return id;
    }

    private String createDocumentInheritedProperties(String folderId, boolean withContent) {
        ContentStream contentStream = null;
        VersioningState versioningState = VersioningState.NONE;
        List<String> policies = null;
        Acl addACEs = null;
        Acl removeACEs = null;
        ExtensionsData extension = null;
View Full Code Here


        assertTrue(fCreator.verifyContent(retrievedContent, fCreator.createContent()));
    }

    @Test
    public void testGetPropertiesOfLatestVersion() {
        VersioningState versioningState = VersioningState.MAJOR;
        String verId = createDocument(PROP_NAME, fRootFolderId, versioningState);
        getDocument(verId);

        ObjectData version = fObjSvc.getObject(fRepositoryId, verId, "*", false, IncludeRelationships.NONE, null,
                false, false, null);
View Full Code Here

        checkVersionProperties(verId, versioningState, latest.getProperties(), checkinComment);
    }

    @Test
    public void testGetLatestVersion() {
        VersioningState versioningState = VersioningState.MINOR;
        String verId = createDocument(PROP_NAME, fRootFolderId, versioningState);
        getDocument(verId);

        ObjectData version = fObjSvc.getObject(fRepositoryId, verId, "*", false, IncludeRelationships.NONE, null,
                false, false, null);
View Full Code Here

                                   ContentStream contentStream) {
        if (!cmisProperties.containsKey(PropertyIds.OBJECT_TYPE_ID)) {
            cmisProperties.put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
        }

        VersioningState versioningState = VersioningState.NONE;
        if (cmisSessionFacade
                .isObjectTypeVersionable((String)cmisProperties.get(PropertyIds.OBJECT_TYPE_ID))) {
            versioningState = VersioningState.MAJOR;
        }
        LOG.debug("Creating document with properties: {}", cmisProperties);
View Full Code Here

                                   ContentStream contentStream) {
        if (!cmisProperties.containsKey(PropertyIds.OBJECT_TYPE_ID)) {
            cmisProperties.put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
        }

        VersioningState versioningState = VersioningState.NONE;
        if (cmisSessionFacade
                .isObjectTypeVersionable((String)cmisProperties.get(PropertyIds.OBJECT_TYPE_ID))) {
            versioningState = VersioningState.MAJOR;
        }
        LOG.debug("Creating document with properties: {}", cmisProperties);
View Full Code Here

     */
    public static void createDocument(CallContext context, CmisService service, String repositoryId,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        // get parameters
        String folderId = (String) context.get(CONTEXT_OBJECT_ID);
        VersioningState versioningState = getEnumParameter(request, PARAM_VERSIONIG_STATE, VersioningState.class);
        String token = getStringParameter(request, PARAM_TOKEN);
        boolean succinct = getBooleanParameter(request, Constants.CONTROL_SUCCINCT, false);

        // execute
        ControlParser cp = new ControlParser(request);
View Full Code Here

    public static void createDocumentFromSource(CallContext context, CmisService service, String repositoryId,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        // get parameters
        String folderId = (String) context.get(CONTEXT_OBJECT_ID);
        String sourceId = getStringParameter(request, PARAM_SOURCE_ID);
        VersioningState versioningState = getEnumParameter(request, PARAM_VERSIONIG_STATE, VersioningState.class);
        String token = getStringParameter(request, PARAM_TOKEN);
        boolean succinct = getBooleanParameter(request, Constants.CONTROL_SUCCINCT, false);

        // execute
        ControlParser cp = new ControlParser(request);
View Full Code Here

            addResult(createResult(FAILURE, "Type is not a document type! Type: " + objectTypeId, true));
            return null;
        }

        DocumentTypeDefinition docType = (DocumentTypeDefinition) type;
        VersioningState versioningState = (Boolean.TRUE.equals(docType.isVersionable()) ? VersioningState.MAJOR
                : VersioningState.NONE);

        byte[] contentBytes = null;
        Document result = null;
        try {
View Full Code Here

     * specification. This implementation follow the CMIS 1.1 draft.)
     */
    private static void createUnfiledObject(CallContext context, CmisService service, String repositoryId,
            HttpServletRequest request, HttpServletResponse response, AtomEntryParser parser) throws Exception {
        // get additional parameters
        VersioningState versioningState = getEnumParameter(request, Constants.PARAM_VERSIONIG_STATE,
                VersioningState.class);

        // create
        String newObjectId = service.create(repositoryId, parser.getProperties(), null, parser.getContentStream(),
                versioningState, parser.getPolicyIds(), null);
View Full Code Here

    public static void create(CallContext context, CmisService service, String repositoryId,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        // get parameters
        String folderId = getStringParameter(request, Constants.PARAM_ID);
        String sourceFolderId = getStringParameter(request, Constants.PARAM_SOURCE_FOLDER_ID);
        VersioningState versioningState = getEnumParameter(request, Constants.PARAM_VERSIONIG_STATE,
                VersioningState.class);

        AtomEntryParser parser = new AtomEntryParser(context.getTempDirectory(), context.getMemoryThreshold(),
                context.getMaxContentSize(), context.encryptTempFiles());
        parser.setIgnoreAtomContentSrc(true); // needed for some clients
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.enums.VersioningState

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.