mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Ldap progress and user/person search
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2201 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
<cm:folder view:childName="${spaces.guest_home.childname}">
|
<cm:folder view:childName="${spaces.guest_home.childname}">
|
||||||
<view:acl view:inherit="false">
|
<view:acl view:inherit="false">
|
||||||
<view:ace view:access="ALLOWED">
|
<view:ace view:access="ALLOWED">
|
||||||
<view:authority>Guest</view:authority>
|
<view:authority>guest</view:authority>
|
||||||
<view:permission>Read</view:permission>
|
<view:permission>Read</view:permission>
|
||||||
</view:ace>
|
</view:ace>
|
||||||
<view:ace view:access="ALLOWED">
|
<view:ace view:access="ALLOWED">
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<cm:person view:childName="cm:person">
|
<cm:person view:childName="cm:person">
|
||||||
<view:acl view:inherit="false">
|
<view:acl view:inherit="false">
|
||||||
<view:ace view:access="ALLOWED">
|
<view:ace view:access="ALLOWED">
|
||||||
<view:authority>Guest</view:authority>
|
<view:authority>guest</view:authority>
|
||||||
<view:permission>Read</view:permission>
|
<view:permission>Read</view:permission>
|
||||||
</view:ace>
|
</view:ace>
|
||||||
</view:acl>
|
</view:acl>
|
||||||
|
@@ -140,6 +140,11 @@
|
|||||||
<ref local="ftsIndexerTrigger" />
|
<ref local="ftsIndexerTrigger" />
|
||||||
<ref local="indexRecoveryTrigger" />
|
<ref local="indexRecoveryTrigger" />
|
||||||
<ref local="indexBackupTrigger" />
|
<ref local="indexBackupTrigger" />
|
||||||
|
<!--
|
||||||
|
<ref bean="ldapGroupTrigger" />
|
||||||
|
<ref bean="ldapPeopleTrigger" />
|
||||||
|
-->
|
||||||
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<property name="waitForJobsToCompleteOnShutdown">
|
<property name="waitForJobsToCompleteOnShutdown">
|
||||||
|
@@ -24,11 +24,22 @@ import java.io.FileWriter;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.transaction.UserTransaction;
|
||||||
|
|
||||||
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
|
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||||
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
|
import org.alfresco.service.cmr.search.SearchService;
|
||||||
import org.alfresco.service.cmr.view.ImporterBinding;
|
import org.alfresco.service.cmr.view.ImporterBinding;
|
||||||
import org.alfresco.service.cmr.view.ImporterService;
|
import org.alfresco.service.cmr.view.ImporterService;
|
||||||
import org.alfresco.service.cmr.view.Location;
|
import org.alfresco.service.cmr.view.Location;
|
||||||
|
import org.alfresco.service.namespace.NamespacePrefixResolver;
|
||||||
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.TempFileProvider;
|
import org.alfresco.util.TempFileProvider;
|
||||||
import org.dom4j.io.OutputFormat;
|
import org.dom4j.io.OutputFormat;
|
||||||
import org.dom4j.io.XMLWriter;
|
import org.dom4j.io.XMLWriter;
|
||||||
@@ -39,10 +50,22 @@ public class ExportSourceImporter implements ImporterJobSPI
|
|||||||
|
|
||||||
private ExportSource exportSource;
|
private ExportSource exportSource;
|
||||||
|
|
||||||
|
private AuthenticationComponent authenticationComponent;
|
||||||
|
|
||||||
private StoreRef storeRef;
|
private StoreRef storeRef;
|
||||||
|
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
|
private boolean clearAllChildren;
|
||||||
|
|
||||||
|
private NodeService nodeService;
|
||||||
|
|
||||||
|
private SearchService searchService;
|
||||||
|
|
||||||
|
private NamespacePrefixResolver namespacePrefixResolver;
|
||||||
|
|
||||||
|
private TransactionService transactionService;
|
||||||
|
|
||||||
public ExportSourceImporter()
|
public ExportSourceImporter()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
@@ -58,10 +81,68 @@ public class ExportSourceImporter implements ImporterJobSPI
|
|||||||
this.exportSource = exportSource;
|
this.exportSource = exportSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setClearAllChildren(boolean clearAllChildren)
|
||||||
|
{
|
||||||
|
this.clearAllChildren = clearAllChildren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPath(String path)
|
||||||
|
{
|
||||||
|
this.path = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoreRef(String storeRef)
|
||||||
|
{
|
||||||
|
this.storeRef = new StoreRef(storeRef);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactionService(TransactionService transactionService)
|
||||||
|
{
|
||||||
|
this.transactionService = transactionService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNamespacePrefixResolver(NamespacePrefixResolver namespacePrefixResolver)
|
||||||
|
{
|
||||||
|
this.namespacePrefixResolver = namespacePrefixResolver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeService(NodeService nodeService)
|
||||||
|
{
|
||||||
|
this.nodeService = nodeService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
|
||||||
|
{
|
||||||
|
this.authenticationComponent = authenticationComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSearchService(SearchService searchService)
|
||||||
|
{
|
||||||
|
this.searchService = searchService;
|
||||||
|
}
|
||||||
|
|
||||||
public void doImport()
|
public void doImport()
|
||||||
{
|
{
|
||||||
|
UserTransaction userTransaction = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
userTransaction = transactionService.getUserTransaction();
|
||||||
|
userTransaction.begin();
|
||||||
|
authenticationComponent.setSystemUserAsCurrentUser();
|
||||||
|
if(clearAllChildren)
|
||||||
|
{
|
||||||
|
List<NodeRef> refs = searchService.selectNodes(nodeService.getRootNode(storeRef), path, null, namespacePrefixResolver, false);
|
||||||
|
for(NodeRef ref: refs)
|
||||||
|
{
|
||||||
|
for(ChildAssociationRef car: nodeService.getChildAssocs(ref))
|
||||||
|
{
|
||||||
|
nodeService.deleteNode(car.getChildRef());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
File tempFile = TempFileProvider.createTempFile("ExportSourceImporter-", ".xml");
|
File tempFile = TempFileProvider.createTempFile("ExportSourceImporter-", ".xml");
|
||||||
Writer writer = new BufferedWriter(new FileWriter(tempFile));
|
Writer writer = new BufferedWriter(new FileWriter(tempFile));
|
||||||
XMLWriter xmlWriter = createXMLExporter(writer);
|
XMLWriter xmlWriter = createXMLExporter(writer);
|
||||||
@@ -75,10 +156,17 @@ public class ExportSourceImporter implements ImporterJobSPI
|
|||||||
|
|
||||||
importerService.importView(reader, location, REPLACE_BINDING, null);
|
importerService.importView(reader, location, REPLACE_BINDING, null);
|
||||||
reader.close();
|
reader.close();
|
||||||
|
userTransaction.commit();
|
||||||
}
|
}
|
||||||
catch (IOException io)
|
catch(Throwable t)
|
||||||
{
|
{
|
||||||
throw new ExportSourceImporterException("Failed to import", io);
|
try { if (userTransaction != null) {userTransaction.rollback();} } catch (Exception ex) {}
|
||||||
|
try {authenticationComponent.clearCurrentSecurityContext(); } catch (Exception ex) {}
|
||||||
|
throw new ExportSourceImporterException("Failed to import", t);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
authenticationComponent.clearCurrentSecurityContext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +189,7 @@ public class ExportSourceImporter implements ImporterJobSPI
|
|||||||
|
|
||||||
public UUID_BINDING getUUIDBinding()
|
public UUID_BINDING getUUIDBinding()
|
||||||
{
|
{
|
||||||
return UUID_BINDING.REPLACE_EXISTING;
|
return UUID_BINDING.UPDATE_EXISTING;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValue(String key)
|
public String getValue(String key)
|
||||||
|
@@ -79,10 +79,10 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
|
|||||||
gas[0] = new GrantedAuthorityImpl("ROLE_SYSTEM");
|
gas[0] = new GrantedAuthorityImpl("ROLE_SYSTEM");
|
||||||
ud = new User(SYSTEM_USER_NAME, "", true, true, true, true, gas);
|
ud = new User(SYSTEM_USER_NAME, "", true, true, true, true, gas);
|
||||||
}
|
}
|
||||||
else if (userName.equals(PermissionService.GUEST))
|
else if (userName.equalsIgnoreCase(PermissionService.GUEST))
|
||||||
{
|
{
|
||||||
GrantedAuthority[] gas = new GrantedAuthority[0];
|
GrantedAuthority[] gas = new GrantedAuthority[0];
|
||||||
ud = new User(PermissionService.GUEST, "", true, true, true, true, gas);
|
ud = new User(PermissionService.GUEST.toLowerCase(), "", true, true, true, true, gas);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -215,7 +215,7 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
|
|||||||
*/
|
*/
|
||||||
public String getGuestUserName()
|
public String getGuestUserName()
|
||||||
{
|
{
|
||||||
return PermissionService.GUEST;
|
return PermissionService.GUEST.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -39,6 +39,9 @@ import org.alfresco.service.cmr.repository.NodeService;
|
|||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||||
import org.alfresco.service.cmr.search.QueryParameterDefinition;
|
import org.alfresco.service.cmr.search.QueryParameterDefinition;
|
||||||
|
import org.alfresco.service.cmr.search.ResultSet;
|
||||||
|
import org.alfresco.service.cmr.search.ResultSetRow;
|
||||||
|
import org.alfresco.service.cmr.search.SearchParameters;
|
||||||
import org.alfresco.service.cmr.search.SearchService;
|
import org.alfresco.service.cmr.search.SearchService;
|
||||||
import org.alfresco.service.namespace.NamespacePrefixResolver;
|
import org.alfresco.service.namespace.NamespacePrefixResolver;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
@@ -81,8 +84,6 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao
|
|||||||
this.dictionaryService = dictionaryService;
|
this.dictionaryService = dictionaryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setNamespaceService(NamespacePrefixResolver namespacePrefixResolver)
|
public void setNamespaceService(NamespacePrefixResolver namespacePrefixResolver)
|
||||||
{
|
{
|
||||||
this.namespacePrefixResolver = namespacePrefixResolver;
|
this.namespacePrefixResolver = namespacePrefixResolver;
|
||||||
@@ -103,10 +104,11 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao
|
|||||||
this.searchService = searchService;
|
this.searchService = searchService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserDetails loadUserByUsername(String caseSensitiveUserName) throws UsernameNotFoundException, DataAccessException
|
public UserDetails loadUserByUsername(String caseSensitiveUserName) throws UsernameNotFoundException,
|
||||||
|
DataAccessException
|
||||||
{
|
{
|
||||||
String userName = userNamesAreCaseSensitive ? caseSensitiveUserName: caseSensitiveUserName.toLowerCase();
|
String userName = userNamesAreCaseSensitive ? caseSensitiveUserName : caseSensitiveUserName.toLowerCase();
|
||||||
NodeRef userRef = getUserOrNull(userNamesAreCaseSensitive ? userName: userName.toLowerCase());
|
NodeRef userRef = getUserOrNull(userNamesAreCaseSensitive ? userName : userName.toLowerCase());
|
||||||
if (userRef == null)
|
if (userRef == null)
|
||||||
{
|
{
|
||||||
throw new UsernameNotFoundException("Could not find user by userName: " + caseSensitiveUserName);
|
throw new UsernameNotFoundException("Could not find user by userName: " + caseSensitiveUserName);
|
||||||
@@ -126,24 +128,36 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao
|
|||||||
|
|
||||||
public NodeRef getUserOrNull(String caseSensitiveUserName)
|
public NodeRef getUserOrNull(String caseSensitiveUserName)
|
||||||
{
|
{
|
||||||
String userName = userNamesAreCaseSensitive ? caseSensitiveUserName: caseSensitiveUserName.toLowerCase();
|
String userName = userNamesAreCaseSensitive ? caseSensitiveUserName : caseSensitiveUserName.toLowerCase();
|
||||||
NodeRef rootNode = nodeService.getRootNode(getUserStoreRef());
|
SearchParameters sp = new SearchParameters();
|
||||||
QueryParameterDefinition[] defs = new QueryParameterDefinition[1];
|
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||||
DataTypeDefinition text = dictionaryService.getDataType(DataTypeDefinition.TEXT);
|
sp.setQuery("@usr\\:username:" + userName);
|
||||||
defs[0] = new QueryParameterDefImpl(QName.createQName("usr", "var", namespacePrefixResolver), text, true,
|
sp.addStore(getUserStoreRef());
|
||||||
userName);
|
sp.excludeDataInTheCurrentTransaction(false);
|
||||||
List<NodeRef> results = searchService.selectNodes(rootNode, PEOPLE_FOLDER
|
|
||||||
+ "/usr:user[@usr:username = $usr:var ]", defs, namespacePrefixResolver, false);
|
ResultSet rs = searchService.query(sp);
|
||||||
if (results.size() != 1)
|
|
||||||
|
for (ResultSetRow row : rs)
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
|
NodeRef nodeRef = row.getNodeRef();
|
||||||
|
if (nodeService.exists(nodeRef))
|
||||||
|
{
|
||||||
|
String realUserName = DefaultTypeConverter.INSTANCE.convert(String.class, nodeService.getProperty(
|
||||||
|
nodeRef, ContentModel.PROP_USER_USERNAME));
|
||||||
|
if (realUserName.equals(userName))
|
||||||
|
{
|
||||||
|
return nodeRef;
|
||||||
}
|
}
|
||||||
return results.get(0);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createUser(String caseSensitiveUserName, char[] rawPassword) throws AuthenticationException
|
public void createUser(String caseSensitiveUserName, char[] rawPassword) throws AuthenticationException
|
||||||
{
|
{
|
||||||
String userName = userNamesAreCaseSensitive ? caseSensitiveUserName: caseSensitiveUserName.toLowerCase();
|
String userName = userNamesAreCaseSensitive ? caseSensitiveUserName : caseSensitiveUserName.toLowerCase();
|
||||||
NodeRef userRef = getUserOrNull(userName);
|
NodeRef userRef = getUserOrNull(userName);
|
||||||
if (userRef != null)
|
if (userRef != null)
|
||||||
{
|
{
|
||||||
@@ -167,10 +181,8 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao
|
|||||||
private NodeRef getOrCreateTypeLocation()
|
private NodeRef getOrCreateTypeLocation()
|
||||||
{
|
{
|
||||||
NodeRef rootNode = nodeService.getRootNode(getUserStoreRef());
|
NodeRef rootNode = nodeService.getRootNode(getUserStoreRef());
|
||||||
List<ChildAssociationRef> results = nodeService.getChildAssocs(
|
List<ChildAssociationRef> results = nodeService.getChildAssocs(rootNode, RegexQNamePattern.MATCH_ALL, QName
|
||||||
rootNode,
|
.createQName("sys", "system", namespacePrefixResolver));
|
||||||
RegexQNamePattern.MATCH_ALL,
|
|
||||||
QName.createQName("sys", "system", namespacePrefixResolver));
|
|
||||||
NodeRef sysNode = null;
|
NodeRef sysNode = null;
|
||||||
if (results.size() == 0)
|
if (results.size() == 0)
|
||||||
{
|
{
|
||||||
@@ -182,10 +194,8 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao
|
|||||||
{
|
{
|
||||||
sysNode = results.get(0).getChildRef();
|
sysNode = results.get(0).getChildRef();
|
||||||
}
|
}
|
||||||
results = nodeService.getChildAssocs(
|
results = nodeService.getChildAssocs(sysNode, RegexQNamePattern.MATCH_ALL, QName.createQName("sys", "people",
|
||||||
sysNode,
|
namespacePrefixResolver));
|
||||||
RegexQNamePattern.MATCH_ALL,
|
|
||||||
QName.createQName("sys", "people", namespacePrefixResolver));
|
|
||||||
NodeRef typesNode = null;
|
NodeRef typesNode = null;
|
||||||
if (results.size() == 0)
|
if (results.size() == 0)
|
||||||
{
|
{
|
||||||
|
@@ -34,6 +34,9 @@ import org.alfresco.service.cmr.repository.NodeService;
|
|||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||||
import org.alfresco.service.cmr.search.QueryParameterDefinition;
|
import org.alfresco.service.cmr.search.QueryParameterDefinition;
|
||||||
|
import org.alfresco.service.cmr.search.ResultSet;
|
||||||
|
import org.alfresco.service.cmr.search.ResultSetRow;
|
||||||
|
import org.alfresco.service.cmr.search.SearchParameters;
|
||||||
import org.alfresco.service.cmr.search.SearchService;
|
import org.alfresco.service.cmr.search.SearchService;
|
||||||
import org.alfresco.service.cmr.security.PersonService;
|
import org.alfresco.service.cmr.security.PersonService;
|
||||||
import org.alfresco.service.namespace.NamespacePrefixResolver;
|
import org.alfresco.service.namespace.NamespacePrefixResolver;
|
||||||
@@ -125,18 +128,31 @@ public class PersonServiceImpl implements PersonService
|
|||||||
public NodeRef getPersonOrNull(String caseSensitiveUserName)
|
public NodeRef getPersonOrNull(String caseSensitiveUserName)
|
||||||
{
|
{
|
||||||
String userName = userNamesAreCaseSensitive ? caseSensitiveUserName : caseSensitiveUserName.toLowerCase();
|
String userName = userNamesAreCaseSensitive ? caseSensitiveUserName : caseSensitiveUserName.toLowerCase();
|
||||||
NodeRef rootNode = nodeService.getRootNode(storeRef);
|
SearchParameters sp = new SearchParameters();
|
||||||
QueryParameterDefinition[] defs = new QueryParameterDefinition[1];
|
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||||
DataTypeDefinition text = dictionaryService.getDataType(DataTypeDefinition.TEXT);
|
sp.setQuery("@cm\\:userName:" + userName);
|
||||||
defs[0] = new QueryParameterDefImpl(QName.createQName("cm", "var", namespacePrefixResolver), text, true,
|
sp.addStore(storeRef);
|
||||||
userName);
|
sp.excludeDataInTheCurrentTransaction(false);
|
||||||
List<NodeRef> results = searchService.selectNodes(rootNode, PEOPLE_FOLDER
|
|
||||||
+ "/cm:person[@cm:userName = $cm:var ]", defs, namespacePrefixResolver, false);
|
ResultSet rs = searchService.query(sp);
|
||||||
if (results.size() != 1)
|
|
||||||
|
for (ResultSetRow row : rs)
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
|
NodeRef nodeRef = row.getNodeRef();
|
||||||
|
if (nodeService.exists(nodeRef))
|
||||||
|
{
|
||||||
|
String realUserName = DefaultTypeConverter.INSTANCE.convert(String.class, nodeService.getProperty(
|
||||||
|
nodeRef, ContentModel.PROP_USERNAME));
|
||||||
|
realUserName = userNamesAreCaseSensitive ? realUserName : realUserName.toLowerCase();
|
||||||
|
if (realUserName.equals(userName))
|
||||||
|
{
|
||||||
|
return nodeRef;
|
||||||
}
|
}
|
||||||
return results.get(0);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean createMissingPeople()
|
public boolean createMissingPeople()
|
||||||
@@ -265,12 +281,26 @@ public class PersonServiceImpl implements PersonService
|
|||||||
|
|
||||||
public Set<NodeRef> getAllPeople()
|
public Set<NodeRef> getAllPeople()
|
||||||
{
|
{
|
||||||
NodeRef rootNode = nodeService.getRootNode(storeRef);
|
SearchParameters sp = new SearchParameters();
|
||||||
List<NodeRef> results = searchService.selectNodes(rootNode, PEOPLE_FOLDER + "/cm:person", null,
|
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||||
namespacePrefixResolver, false);
|
sp.setQuery("TYPE:\"" + ContentModel.TYPE_PERSON+"\"");
|
||||||
HashSet<NodeRef> all = new HashSet<NodeRef>();
|
sp.addStore(storeRef);
|
||||||
all.addAll(results);
|
sp.excludeDataInTheCurrentTransaction(false);
|
||||||
return all;
|
|
||||||
|
ResultSet rs = searchService.query(sp);
|
||||||
|
|
||||||
|
HashSet<NodeRef> nodes = new HashSet<NodeRef>();
|
||||||
|
for (ResultSetRow row : rs)
|
||||||
|
{
|
||||||
|
|
||||||
|
NodeRef nodeRef = row.getNodeRef();
|
||||||
|
if (nodeService.exists(nodeRef))
|
||||||
|
{
|
||||||
|
nodes.add(nodeRef);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreateMissingPeople(boolean createMissingPeople)
|
public void setCreateMissingPeople(boolean createMissingPeople)
|
||||||
|
Reference in New Issue
Block a user