How to create User via JCR API ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2006 04:50 AM
Hi to all!
This is my first post!
To create a Folder I use:
//Session Login
Session session = repository.login(new SimpleCredentials(userId, password.toCharArray()));
//Retrieve parameters
String id, foldername;
//Retrieve root
Node parentNode = session.getNodeByUUID(id);
//Add new Node to Parent
Node contentNode = parentNode.addNode("cm:"+foldername, "cm:folder");
//Set Property File's name
contentNode.setProperty("cm:name", foldername);
//Commit the session
session.save();
//Logout
session.logout();
My actual problem is to create an User!
Must I use the "cm:" string similarly in the first example?
Can you help me?
Sorry for my bad English!
This is my first post!

To create a Folder I use:
//Session Login
Session session = repository.login(new SimpleCredentials(userId, password.toCharArray()));
//Retrieve parameters
String id, foldername;
//Retrieve root
Node parentNode = session.getNodeByUUID(id);
//Add new Node to Parent
Node contentNode = parentNode.addNode("cm:"+foldername, "cm:folder");
//Set Property File's name
contentNode.setProperty("cm:name", foldername);
//Commit the session
session.save();
//Logout
session.logout();
My actual problem is to create an User!
Must I use the "cm:" string similarly in the first example?
Can you help me?

Sorry for my bad English!

Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2006 10:54 AM
There isn't support for managing users in the JCR spec.
You can use Alfresco's native API for creating users (or LDAP, Active Directory etc depending on your user management).
You can use Alfresco's native API for creating users (or LDAP, Active Directory etc depending on your user management).
