cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco API - how to accomplish specific tasks

impiastro
Champ in-the-making
Champ in-the-making
I everyone.

I'm new to Alfresco.
I'm try to connect and interact with the Alfresco Repository (at the moment with the community edition 4.2.d) using the CMIS AtomPub binding through the wonderful Python cmislib library.

I can create, update and delete elements, I can query (also fulltext) documents, I can checkout and checkin documents with comments.
I know that CMIS 1.1 spec covers also type mutability, secondary types (or aspects) and many other interesting features, but, as far as I know Alfresco doesn't expose CMIS 1.1 compatible API yet.

I'm trying to "customize" Alfresco repository using only external APIs, as a black box, avoiding writing Java extensions and classes (which usually require Alfresco restart).
What is, at the moment, the best approach for Alfresco to create custom content types and aspects, managing users/groups/roles, managing ACLs to objects and folders, and all other features not covered natively by CMIS using only API (SOAP or REST)?
Is the Web Script framework the preferrable way?

Thanks for your knowledge sharing…

ROb
2 REPLIES 2

binduwavell
Star Contributor
Star Contributor
What is, at the moment, the best approach for Alfresco to create custom content types and aspects.

You can upload model definitions into a folder in the Data Dictionary and your changes should be reflected right away. In general I would not recommend doing this in production. For production I'd make sure the models are deployed using a spring context file via the classpath.

managing users/groups/roles

I'm not sure what all management tasks you have in mind. You may find that setting up LDAP synchronization will allow you to create/update users and groups reasonably easily. You can trigger LDAP syncs just in time via a JMX client such as jconsole.

You can manage ACLs via CMIS but I wouldn't recommend doing so unless you are really bound and determined to take that path.

You might take a look at my blog post on the CORSET design pattern, not sure it helps since it will require some logic to be included in the repository. Potentially via folder rules and javascript, but still…

http://contentpeople.com/tech-tips/the-corset-content-management-design-pattern/

One thing that might help you a bunch is to install the js-console plugin to alfresco and then create javascripts for lots of your management tasks (user/group/role/ACL management.)

http://share-extras.github.io/addons/js-console/


Thanks Bindu for your pointers.

You confirmed me that the only way to add content types and aspects is done using Data Dictionary or using the Spring context file. OK.

For managing users, groups and roles I meant creating users and updating users, creating and updating groups and creating and updating roles using the Alfresco Security standard repository and not an external one like LDAP.
LDAP is a good way to do that but we haven't such a blck inside our technology stack.

I'll reading soon your post and js-console plugin.

Bye,

ROb