Examples of VersioningState


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

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

        // execute
        ControlParser cp = new ControlParser(request);
        TypeCache typeCache = new TypeCacheImpl(repositoryId, service);
View Full Code Here

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

        return id;
    }

    private String createDocument(String folderId, int no, int level) {
        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

        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

                String filename = filenameField.getText();

                try {
                    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

                    VersioningState versioningState = VersioningState.NONE;
                    if (versioningStateMajorButton.isSelected()) {
                        versioningState = VersioningState.MAJOR;
                    } else if (versioningStateMinorButton.isSelected()) {
                        versioningState = VersioningState.MINOR;
                    } else if (versioningStateCheckedoutButton.isSelected()) {
View Full Code Here

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

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

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

            // create and fetch the document
            ObjectId id = session.createDocument(properties, testFolder, contentStream, versioningState);
            Document doc = (Document) session.getObject(id);
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.