Examples of VersioningState


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

        return false;
     }

      private String createVersionedDocument(String name, String folderId) {

          VersioningState versioningState = VersioningState.MAJOR;
          String id = null;
          Map<String, String> properties = new HashMap<String, String>();
          id = fCreator.createDocument(name, UnitTestTypeSystemCreator.VERSIONED_TYPE, folderId,
                  versioningState, properties);
View Full Code Here

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

    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());
        parser.setIgnoreAtomContentSrc(true); // needed for some clients
        parser.parse(request.getInputStream());
View Full Code Here

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

     * 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

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

    public void testCreateDocument() throws Exception {
        if (!isEnabled(TEST_CREATE_DOCUMENT)) {
            return;
        }

        VersioningState vs = (isVersionable(getDefaultDocumentType()) ? VersioningState.MAJOR : VersioningState.NONE);

        // create document
        List<PropertyData<?>> propList = new ArrayList<PropertyData<?>>();
        propList.add(getObjectFactory().createPropertyStringData(PropertyIds.NAME, "testdoc.txt"));
        propList.add(getObjectFactory().createPropertyIdData(PropertyIds.OBJECT_TYPE_ID, getDefaultDocumentType()));
View Full Code Here

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

    public void testCreateDocumentFromSource() throws Exception {
        if (!isEnabled(TEST_CREATE_FROM_SOURCE)) {
            return;
        }

        VersioningState vs = (isVersionable(getDefaultDocumentType()) ? VersioningState.MAJOR : VersioningState.NONE);

        String docId = createDefaultDocument(getTestRootFolder(), "testdoc.org.txt", CONTENT_TYPE, CONTENT);

        // create a copy
        List<PropertyData<?>> propList2 = new ArrayList<PropertyData<?>>();
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

        assertEquals(typeId, pd.getFirstValue());
    }

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