git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/branches/data-access/storagehub-webapp/1.0@176426 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3ee7c2e52f
commit
d7448eb8f1
|
@ -149,12 +149,22 @@ public class ItemsManager {
|
|||
try{
|
||||
ses = repository.getRepository().login(CredentialHandler.getAdminCredentials(context));
|
||||
authChecker.checkReadAuthorizationControl(ses, id);
|
||||
|
||||
//NOT using the internal pattern matching of jcr because of title for shared folder
|
||||
NodeIterator it = ses.getNodeByIdentifier(id).getNodes();
|
||||
while (it.hasNext()) {
|
||||
Node child= it.nextNode();
|
||||
Item item = node2Item.getItem(child, excludes);
|
||||
if (item.getName().equalsIgnoreCase(name) || item.getTitle().equalsIgnoreCase(name))
|
||||
toReturn.add(item);
|
||||
String nodeName = child.getName();
|
||||
if (!child.hasProperty(NodeProperty.TITLE.toString())) continue;
|
||||
String title = child.getProperty(NodeProperty.TITLE.toString()).getString();
|
||||
|
||||
String cleanedName = name;
|
||||
if (name.startsWith("*")) cleanedName = name.substring(1);
|
||||
if (name.endsWith("*")) cleanedName = name.substring(0, name.length()-1);
|
||||
|
||||
if ((name.startsWith("*") && (nodeName.endsWith(cleanedName) || title.endsWith(cleanedName))) || (name.endsWith("*") && (nodeName.startsWith(cleanedName) || title.startsWith(cleanedName)))
|
||||
|| (nodeName.equals(cleanedName) || title.equals(cleanedName)))
|
||||
toReturn.add(node2Item.getItem(child, excludes));
|
||||
}
|
||||
|
||||
}catch(RepositoryException re){
|
||||
|
|
Loading…
Reference in New Issue