mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Correcting a couple of typos in javadoc and a minor refactoring in TransferServiceImpl.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19253 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -228,17 +228,7 @@ public class TransferServiceImpl implements TransferService
|
|||||||
for(ChildAssociationRef group : groups)
|
for(ChildAssociationRef group : groups)
|
||||||
{
|
{
|
||||||
NodeRef groupNode = group.getChildRef();
|
NodeRef groupNode = group.getChildRef();
|
||||||
List<ChildAssociationRef>children = nodeService.getChildAssocs(groupNode, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
ret.addAll(getTransferTargets(groupNode));
|
||||||
|
|
||||||
for(ChildAssociationRef child : children)
|
|
||||||
{
|
|
||||||
if(nodeService.getType(child.getChildRef()).equals(TransferModel.TYPE_TRANSFER_TARGET))
|
|
||||||
{
|
|
||||||
TransferTargetImpl newTarget = new TransferTargetImpl();
|
|
||||||
mapTransferTarget(child.getChildRef(), newTarget);
|
|
||||||
ret.add(newTarget);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -251,8 +241,6 @@ public class TransferServiceImpl implements TransferService
|
|||||||
{
|
{
|
||||||
NodeRef home = getTransferHome();
|
NodeRef home = getTransferHome();
|
||||||
|
|
||||||
Set<TransferTarget> ret = new HashSet<TransferTarget>();
|
|
||||||
|
|
||||||
// get group with assoc groupName
|
// get group with assoc groupName
|
||||||
NodeRef groupNode = nodeService.getChildByName(home, ContentModel.ASSOC_CONTAINS, groupName);
|
NodeRef groupNode = nodeService.getChildByName(home, ContentModel.ASSOC_CONTAINS, groupName);
|
||||||
|
|
||||||
@@ -262,9 +250,17 @@ public class TransferServiceImpl implements TransferService
|
|||||||
throw new TransferException(MSG_NO_GROUP, new Object[]{groupName});
|
throw new TransferException(MSG_NO_GROUP, new Object[]{groupName});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return getTransferTargets(groupNode);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get children of groupNode
|
* Given the noderef of a group of transfer targets, return all the contained transfer targets.
|
||||||
|
* @param groupNode
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
|
private Set<TransferTarget> getTransferTargets(NodeRef groupNode)
|
||||||
|
{
|
||||||
|
Set<TransferTarget> result = new HashSet<TransferTarget>();
|
||||||
List<ChildAssociationRef>children = nodeService.getChildAssocs(groupNode, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
List<ChildAssociationRef>children = nodeService.getChildAssocs(groupNode, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
||||||
|
|
||||||
for(ChildAssociationRef child : children)
|
for(ChildAssociationRef child : children)
|
||||||
@@ -273,10 +269,10 @@ public class TransferServiceImpl implements TransferService
|
|||||||
{
|
{
|
||||||
TransferTargetImpl newTarget = new TransferTargetImpl();
|
TransferTargetImpl newTarget = new TransferTargetImpl();
|
||||||
mapTransferTarget(child.getChildRef(), newTarget);
|
mapTransferTarget(child.getChildRef(), newTarget);
|
||||||
ret.add(newTarget);
|
result.add(newTarget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -126,7 +126,7 @@ public interface TransferService
|
|||||||
* @param endpointPath,
|
* @param endpointPath,
|
||||||
* @param username,
|
* @param username,
|
||||||
* @param password,
|
* @param password,
|
||||||
* @return the newly create transfer target.
|
* @return the newly created transfer target.
|
||||||
*/
|
*/
|
||||||
public TransferTarget createAndSaveTransferTarget(String name, String title, String description, String endpointProtocol,
|
public TransferTarget createAndSaveTransferTarget(String name, String title, String description, String endpointProtocol,
|
||||||
String endpointHost, int endpointPort, String endpointPath, String username, char[] password) throws TransferException;
|
String endpointHost, int endpointPort, String endpointPath, String username, char[] password) throws TransferException;
|
||||||
|
Reference in New Issue
Block a user