cancel
Showing results for 
Search instead for 
Did you mean: 

Script for creating a web project

romschn
Star Collaborator
Star Collaborator
Hi All,

I have a requirement of creating web project without using the out-of-the-box functionality. I need to create a web project using a script.

Has anyone ever created such kind of script to create a web project?

Thanks
5 REPLIES 5

mrogers
Star Contributor
Star Contributor
There's a create web project web script that will do this for you.

romschn
Star Collaborator
Star Collaborator
Thanks for your reply roger.

I am trying to execute the create web project script as below, but it is not creating me a new project, instead it is returning me a list of web projects.

Let me know if I am doing anything wrong here.

Link : http://localhost:8080/alfresco/s/api/wcm/webprojects?name=proj1&title=proj1&dnsName=proj1

Also, I need to add Deployment receiver and each and every step of creating a web project scripted. Could you please suggest how to do it?

Thanks

mrogers
Star Contributor
Star Contributor
That script needs you to post json data rather than adding parameters to the query string (I think).

Unfortunatly there is no api for creating deployment servers.    There was some design work done to implement it but it got "de-prioritized".  Smiley Sad  However a deployment definition is just a child of the web project with a handful of properties.   So it should be fairly easy to implement.

romschn
Star Collaborator
Star Collaborator
I was able to call the web script passing the required JSON request using the poster addon of firefox and the web script created me an empty web project.

As I mentioned earlier, each and every step of creating a web project - we manually follow the OOTB wizard based approach, I need to have it scripted everything.
1. Adding deployment receivers
2. Adding webforms to the project
3. Configuring the workflows
4. Inviting users etc…etc…

On click of my script, my entire web project should get ready having everything setup.

Could you please suggest me your inputs on this.

Looking forward to your answer.

Thanks

romschn
Star Collaborator
Star Collaborator
I have written code to get this done. It will create the entire authoring environment running a single web script which will take care of performing all the steps ,we do from UI, programatically.