Examples of VersioningState


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

            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

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

        // create a 1st document
        String id1 = createDocument(fRootFolderId, true);
        // create a second document with first as source
        String id2 = null;
        try {
            VersioningState versioningState = VersioningState.NONE;
            Properties props = createDocumentPropertiesForDocumentFromSource("Document From Source");
            id2 = fObjSvc.createDocumentFromSource(fRepositoryId, id1, props, fRootFolderId, versioningState, null,
                    null, null, null);
            if (null == id2) {
                fail("createDocumentFromSource failed.");
View Full Code Here

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

        }
    }

    private String createDocumentWithCustomType(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

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

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

    /**
     * Creates a document with the default type.
     */
    protected String createDefaultDocument(String folderId, String name, String contentType, byte[] content) {
        VersioningState vs = (isVersionable(getDefaultDocumentType()) ? VersioningState.MAJOR : VersioningState.NONE);

        List<PropertyData<?>> propList = new ArrayList<PropertyData<?>>();
        propList.add(getObjectFactory().createPropertyStringData(PropertyIds.NAME, name));
        propList.add(getObjectFactory().createPropertyIdData(PropertyIds.OBJECT_TYPE_ID, getDefaultDocumentType()));

View Full Code Here

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

        }
        return id;
    }

    protected String createDocument(String name, String folderId, String typeId, boolean withContent) {
        VersioningState versioningState = VersioningState.NONE;
        return createDocument(name, folderId, typeId, versioningState, withContent);
    }
View Full Code Here

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

    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 transaction = getStringParameter(request, PARAM_TRANSACTION);

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

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

        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

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

        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

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

            Folder folder2 = createFolder(session, testFolder, "copyfolder2");

            // create document
            Document doc1 = createDocument(session, folder1, "copytestdoc.txt", "copy test");

            VersioningState versioningState = VersioningState.MAJOR;
            if (!((DocumentTypeDefinition) doc1.getType()).isVersionable()) {
                versioningState = VersioningState.NONE;
            }

            // copy
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.