06-14-2007 10:03 AM
// locate the company home node
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
ResultSet resultSet = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, "PATH:\"/app:company_home\"");
return resultSet.getNodeRef(0);
java.lang.IndexOutOfBoundsException
at org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSet.translateIndex(FilteringResultSet.java:98 )
at org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSet.getNodeRef(FilteringResultSet.java:103)
06-19-2007 09:19 AM
06-20-2007 03:15 AM
protected NodeRef getCompanyHome() throws Exception
{
// locate the company home node
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
ResultSet resultSet = searchService.query(storeRef, SearchService.LANGUAGE_LUCENE, "PATH:\"/app:company_home\"");
return resultSet.getNodeRef(0);
}
protected NodeRef addChildSpace(NodeRef fatherNode,String spaceName) throws Exception
{
// assign name
Map<QName, Serializable> contentProps = new HashMap<QName, Serializable>();
String legalSpaceName = getLegalName(spaceName);
contentProps.put(ContentModel.PROP_NAME, legalSpaceName);
// create space node
ChildAssociationRef association = nodeService.createNode(fatherNode,
ContentModel.ASSOC_CONTAINS,
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, spaceName),
ContentModel.TYPE_FOLDER,
contentProps);
return association.getChildRef();
}
06-20-2007 10:36 AM
06-20-2007 03:49 PM
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.