I want to create a alfresco site using open cmis extension. I researched and found an object type 'F:st:sites' and its properties like 'st:siteVisibility' and 'st:sitePreset'. But I am not very sure that using this we can create a site in alfresco and I am not able to find any method for creating a site. It could be something like
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.NAME, "mySiteName");
properties.put(PropertyIds.OBJECT_TYPE_ID, "F:st:sites");
properties.put("cmis:path", "/Sites");
.
.
properties.put("cmis:createdBy", date);
properties.put("st:siteVisibility", ScriptSiteService.PUBLIC_SITE);
// TODO: add method for creating site with session object
Please reply as soon as possible.
Also, if there is any other way to create a site other than apache's Http api, Please share.
Thanks,
Smita
as long as you don't post your use case, yourfull code & explain in in detail what tools you're using (Apache Chemistry/opencmis? apache's Http api?) you won't get the answer you like to get...
A Site is sth. like a extended folder & there will be an opportunity to create such a folder by using st:site type & adding the relevant properties, BUT:
afaik you won't be able to use this site via Alfresco Share because all SURF objects are not created if you create a site directly in the repo layer (explained here (but a little bit outdated if you use Alfresco 4): http://ecmstuff.blogspot.de/2011/02/creating-alfresco-share-sites-with.html).
Related
Based on the documentation https://learn.microsoft.com/en-us/vsts/extend/overview?view=vsts#what-makes-up-an-extension, a VSTS extension can be used to extend the work item form.
However, I would like my extension to automatically create a new work item type once it is installed. Is this something that is possible? I can't find any documentation online that suggests how to do it.
Theoretically this is possible, the extension has a "first load" call which you can use to use the rest api to create a custom process or update the existing custom process. The REST Api to change processes isn't public yet, so you'll have to work from using fiddler to watch how the web ui does it.
Due to the way processes are linked to projects, all projects with that process will get the new work item type.
I could not find a lot of documentation online for this, but the VSS web extensions SDK(https://www.npmjs.com/package/vss-web-extension-sdk) has a REST client called 'ProcessDefinitionsRestClient' declared in the typings/tfs.d.ts file. This client has a createWorkItemType method available that looks like this:
createWorkItemType(workItemType: ProcessDefinitionsContracts.WorkItemTypeModel, processId: string): IPromise<ProcessDefinitionsContracts.WorkItemTypeModel>;.
The 'ProcessRestClient' client has methods to create a new/inherited process to which the new WIT can be added.
I have not tried it out yet, and these APIs are still in preview, but maybe they can get you started on the right path.
I was trying to use the REST API of TeamCity but i can't find a list of all supported requests and the names of parameters. I wanted to look it up in their official documentation (https://confluence.jetbrains.com/display/TCD10/REST+API)
where a link to exactly this list is provided
(http://teamcity:8111/app/rest/application.wadl)
but i just can't connect to it. Seems like the page is down.
I have googled all kinds of stuff in the hope to find this list somewhere else but i couldn't find anything smart.
Does anyone know where to find such a list or can provide one? That would be fantastic.
Thanks
You can find available API on the public teamcity:
https://teamcity.jetbrains.com/app/rest/swagger.json
You can navigate through the response inside the paths and look at supported methods, and required parameters for each API.
You can also access to the .wadl on the public teamcity server:
https://teamcity.jetbrains.com/app/rest/application.wadl
When you are inside the documentation of teamcity, they use teamcity:8111 as your own teamcity, installed on your server.
The URL examples on this page assume that your TeamCity server web UI is accessible via the http://teamcity:8111 URL.
If you download a copy of teamcity, start a copy of the server, and then connect to /app/rest/application.wadl, you will probably get a copy of representation.
Im quite new to moodle development. Im trying to post activity/notice to a selected course. I could not find any webservice for creating activities within a course. Is there any way i could create a plug-in where i could make a REST call to the plug so that it would create a notice?. An example would help allot.
STEP 1
To create local plugin you can follow following folder structure according to Moodle documentation (https://docs.moodle.org/dev/Local_plugins)-
local/
yourplugin/
db/
access.php
install.php
install.xml
lang/
en/
yourplugin.php
index.php
settings.php
version.php
Meanwhile, creating local plugin does not always really solve all problems as there are limitation depending what you really want to achieve.
what worked for me was editing //moodle_dir/course/modedit.php file, and i was able to make REST Call to add scorm activity to any course i want.
Can someone help me out how I would go on about create documents to repository using soap createDocument.
I have a custom content model and and when I add a new document does not have the properties of the content model.
<ns:properties> <ns1:propertyId
propertyDefinitionId="cmis:objectTypeId">
<ns1:value>cmis:document</ns1:value>
<ns1:value>cms:customModel</ns1:value> </ns:properties>
Also I am looking to upload multiple attachments at time but right now I can't
<ns:contentStream>
<ns:mimeType>application/octet-stream</ns:mimeType>
<!-- Optional:-->
<ns:filename></ns:filename>
<ns:stream><xsl:copy-of select="//someelement"></xsl:copy-of></ns:stream>
</ns:contentStream>
any help on how I can get this working is greatly appreciated.
You should use OpenCMIS or a similar CMIS library instead of writing to the WS binding directly.
You appear to be attempting to set two values for cmis:objectTypeId. If you are trying to create an instance of cms:customModel, that should be the only value.
You aren't setting any custom property values in the snippets you provided.
To my knowledge, there is nothing in the spec allows you to provide multiple attachments simultaneously. You should get a single upload working first.
I'm trying to extend Share DocumentLibrary with a new action that provide a link to some url based on the nodeRef Id (through share-config-custom.xml)
<action id="blabla" type="link" label="label">
<param name="page">../../alfresco/wcs/myPlugin/editor/{node.nodeRef.id}/param>
<param name="target">_blank</param>
</action>
But Share does not interpret {node.nodeRef.id}
It does interpret {node.nodeRef} correctly but I don't need the full URI
Like: workspace://SpacesStore/158f0ed4-a575-40c2-a6ef-7e7ed386ba94
I just want the node ref id : 158f0ed4-a575-40c2-a6ef-7e7ed386ba94
Anyone can explain me the logic behind this and suggest a solution? Thanks
First of all I assume you are asking for Alfresco 4.0. The way how actions can be extended is completely new in 4.0 and most of us haven't used that yet.
The logic that creates the place holders is probably in Java code in the Share webapp (haven't found the exact location). The node.nodeRef is a String so you can not call nodeRef.id. In my opinion you have two options:
You can keep type="link" and node.nodeRef but you link to a custom repository side webscript which then generates the correct URL and forwards (HTTP Status 301) to the correct destination.
You change the type to type="javascript" and implement a callback function in Javascript. This will be called when the link is clicked and can build the correct Url. To include custom javascript you can use the dependencies in the Share config:
As far as I know the only documentation available for extending the new actions is:
http://blogs.alfresco.com/wp/mikeh/tag/4-0/
http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/doclib-web-tier.html
Just use node.id as seen at the Javascript API Wiki