02-20-2007 10:42 AM
02-20-2007 11:27 AM
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 );
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.