Check-in & check-in comments?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 10:42 AM
As far as I can see, when using the JCR interface it's not possible to check-in a Node with check-in comments. These are the comments that show up in the 'Notes' column of the web GUI.
Presuming my statement to be correct, can anyone here say if it' possible to use the Foundation API instead (such as is done to set MIME-types) to check a Node in along with check-in comments?
I should be most grateful,
M.
Presuming my statement to be correct, can anyone here say if it' possible to use the Foundation API instead (such as is done to set MIME-types) to check a Node in along with check-in comments?
I should be most grateful,
M.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2007 11:27 AM
I've been able to achieve this using the Foundation API
…
… which draws from JCRs NodeImpl.checkin() quite alot.

public static ApplicationContext context = null;public static void checkin( Node node, String checkinComment ) throws RepositoryException{ // retrieve service registry ServiceRegistry serviceRegistry = (ServiceRegistry)context.getBean(ServiceRegistry.SERVICE_REGISTRY); // convert the JCR Node to an Alfresco Node Reference NodeRef nodeRef = JCRNodeRef.getNodeRef(node); Map<String, Serializable> versionProperties = new HashMap<String,Serializable>(); versionProperties.put( "description", checkinComment ); serviceRegistry.getVersionService().createVersion( nodeRef, versionProperties ); // set to 'read only' serviceRegistry.getLockService().lock( nodeRef, LockType.READ_ONLY_LOCK ); }
… which draws from JCRs NodeImpl.checkin() quite alot.
