Exemplo n.º 1
0
        protected UpdateResult[] CreateNode(string parentId, string parentPath, string nodeType)
        {
            UpdateResult[] result = null;
            var            parent = new RepositoryWebService.ParentReference(
                spacesStore,
                parentId,
                parentPath,
                Constants.ASSOC_CONTAINS,
                Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, name)
                );

            //build properties
            BuildCustomProperties();

            //create operation
            CMLCreate create = new CMLCreate();

            create.id       = "1";
            create.parent   = parent;
            create.type     = nodeType;        // Constants.TYPE_CONTENT;
            create.property = properties;

            //build the CML object
            CML cml = new CML();

            cml.create = new CMLCreate[] { create };

            //perform a CML update to create the node
            result = WebServiceFactory.getRepositoryService().update(cml);

            return(result);
        }
Exemplo n.º 2
0
        protected RepositoryWebService.ParentReference createParentReference(string uuidNode, string assocType, string assocName)
        {
            RepositoryWebService.ParentReference parentReference = new RepositoryWebService.ParentReference();
            parentReference.associationType = assocType;
            parentReference.childName       = assocName;
            parentReference.store           = new RepositoryWebService.Store(RepositoryWebService.StoreEnum.workspace, Constants.SPACES_STORE);
            parentReference.uuid            = uuidNode;

            return(parentReference);
        }
Exemplo n.º 3
0
        protected RepositoryWebService.ParentReference createParentReference(string uuidNode, string assocType, string assocName)
        {
            RepositoryWebService.ParentReference parentReference = new RepositoryWebService.ParentReference();
            parentReference.associationType = assocType;
            parentReference.childName = assocName;
            parentReference.store = new RepositoryWebService.Store(RepositoryWebService.StoreEnum.workspace, Constants.SPACES_STORE);
            parentReference.uuid = uuidNode;

            return parentReference;
        }
Exemplo n.º 4
0
        protected UpdateResult[] CreateNode(string parentId, string parentPath, string nodeType)
        {
            UpdateResult[] result = null;
            var parent = new RepositoryWebService.ParentReference(
                spacesStore,
                parentId,
                parentPath,
                Constants.ASSOC_CONTAINS,
                Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, name)
                );

            //build properties
            BuildCustomProperties();

            //create operation
            CMLCreate create = new CMLCreate();
            create.id = "1";
            create.parent = parent;
            create.type = nodeType;// Constants.TYPE_CONTENT;
            create.property = properties;

            //build the CML object
            CML cml = new CML();
            cml.create = new CMLCreate[] { create };

            //perform a CML update to create the node
            result = WebServiceFactory.getRepositoryService().update(cml);

            return result;
        }