mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-4357 - delete unused methods after merge
This commit is contained in:
@@ -332,85 +332,4 @@ public class RMNodesImpl extends NodesImpl implements RMNodes
|
||||
|
||||
return new Pair<>(searchTypeQNames, ignoreAspectQNames);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO only override core method when will be made protected in core(REPO-1459).
|
||||
*
|
||||
* @param nodeRef
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
private boolean isSpecialNode(NodeRef nodeRef, QName type)
|
||||
{
|
||||
// Check for File Plan, Transfers Container, Holds Container, Unfiled Records Container
|
||||
NodeRef filePlan = filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
|
||||
if(filePlan != null)
|
||||
{
|
||||
if(filePlan.equals(nodeRef))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if(filePlanService.getTransferContainer(filePlan).equals(nodeRef))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if(filePlanService.getHoldContainer(filePlan).equals(nodeRef))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if(filePlanService.getUnfiledContainer(filePlan).equals(nodeRef))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//TODO just run super after method after it will be made protected on core(REPO-1459)
|
||||
return isCoreSpecialNode(nodeRef, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copied from core implementation, because it is protected and we can't extend it with our special nodes.
|
||||
*
|
||||
* TODO to remove when isSpecialNode method will be made protected in core (REPO-1459).
|
||||
*
|
||||
* @param nodeRef
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
private boolean isCoreSpecialNode(NodeRef nodeRef, QName type)
|
||||
{
|
||||
// Check for Company Home, Sites and Data Dictionary (note: must be tenant-aware)
|
||||
if (nodeRef.equals(repositoryHelper.getCompanyHome()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (type.equals(SiteModel.TYPE_SITES) || type.equals(SiteModel.TYPE_SITE))
|
||||
{
|
||||
// note: alternatively, we could inject SiteServiceInternal and use getSitesRoot (or indirectly via node locator)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
String tenantDomain = TenantUtil.getCurrentDomain();
|
||||
NodeRef ddNodeRef = ddCache.get(tenantDomain);
|
||||
if (ddNodeRef == null)
|
||||
{
|
||||
List<ChildAssociationRef> ddAssocs = nodeService.getChildAssocs(
|
||||
repositoryHelper.getCompanyHome(),
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "dictionary"));
|
||||
if (ddAssocs.size() == 1)
|
||||
{
|
||||
ddNodeRef = ddAssocs.get(0).getChildRef();
|
||||
ddCache.put(tenantDomain, ddNodeRef);
|
||||
}
|
||||
}
|
||||
|
||||
if (nodeRef.equals(ddNodeRef))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user