mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
100983: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 100824: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 100184: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.5) 100131 : Merged DEV to V4.1-BUG-FIX (4.1.10) 99521 : MNT-9088 : Ghost versions when Document is created with CheckinType CHECKOUT - Don't include PWC in a version series 99824 : MNT-9088 : Ghost versions when Document is created with CheckinType CHECKOUT - Return PWC as a part of version series. Fixes to pass TCK git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@100998 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -72,10 +72,14 @@ import org.alfresco.opencmis.search.CMISQueryService;
|
||||
import org.alfresco.opencmis.search.CMISResultSet;
|
||||
import org.alfresco.opencmis.search.CMISResultSetColumn;
|
||||
import org.alfresco.opencmis.search.CMISResultSetRow;
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.Client;
|
||||
import org.alfresco.repo.Client.ClientType;
|
||||
import org.alfresco.repo.action.executer.ContentMetadataExtracter;
|
||||
import org.alfresco.repo.cache.SimpleCache;
|
||||
import org.alfresco.repo.dictionary.DictionaryDAO;
|
||||
import org.alfresco.repo.dictionary.DictionaryListener;
|
||||
import org.alfresco.repo.events.EventPreparator;
|
||||
import org.alfresco.repo.events.EventPublisher;
|
||||
import org.alfresco.repo.model.filefolder.GetChildrenCannedQuery;
|
||||
@@ -242,7 +246,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Derek Hulley
|
||||
* @author steveglover
|
||||
*/
|
||||
public class CMISConnector implements ApplicationContextAware, ApplicationListener<ApplicationContextEvent>, TenantDeployer
|
||||
public class CMISConnector implements ApplicationContextAware, ApplicationListener<ApplicationContextEvent>, TenantDeployer, DictionaryListener
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(CMISConnector.class);
|
||||
|
||||
@@ -324,12 +328,15 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
private CmisActivityPoster activityPoster;
|
||||
|
||||
private BehaviourFilter behaviourFilter;
|
||||
private DictionaryDAO dictionaryDAO;
|
||||
|
||||
private HiddenAspect hiddenAspect;
|
||||
|
||||
private StoreRef storeRef;
|
||||
private String rootPath;
|
||||
private Map<String, List<String>> kindToRenditionNames;
|
||||
private Set<String> ignoreChildren = Collections.emptySet();
|
||||
private Set<QName> ignoreChildrenQNames = Collections.emptySet();
|
||||
|
||||
// note: cache is tenant-aware (if using TransctionalCache impl)
|
||||
|
||||
@@ -461,6 +468,11 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
this.kindToRenditionNames = renditionKinds;
|
||||
}
|
||||
|
||||
public void setIgnoreChildren(Set<String> ignoreChildren)
|
||||
{
|
||||
this.ignoreChildren = ignoreChildren;
|
||||
}
|
||||
|
||||
public void setOpenHttpSession(boolean openHttpSession)
|
||||
{
|
||||
this.openHttpSession = openHttpSession;
|
||||
@@ -499,6 +511,11 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
this.behaviourFilter = behaviourFilter;
|
||||
}
|
||||
|
||||
public void setDictionaryDAO(DictionaryDAO dictionaryDAO)
|
||||
{
|
||||
this.dictionaryDAO = dictionaryDAO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the node service.
|
||||
*/
|
||||
@@ -816,6 +833,7 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Failed to create CMIS temporary directory");
|
||||
}
|
||||
dictionaryDAO.register(this);
|
||||
}
|
||||
|
||||
public void init()
|
||||
@@ -3902,6 +3920,11 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
return descriptorService.getCurrentRepositoryDescriptor().getId();
|
||||
}
|
||||
|
||||
public PagingResults<FileInfo> getChildren(NodeRef folderNodeRef, List<Pair<QName, Boolean>> sortProps, PagingRequest pageRequest)
|
||||
{
|
||||
return fileFolderService.list(folderNodeRef, true, true, ignoreChildrenQNames, sortProps, pageRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the repository info object.
|
||||
*/
|
||||
@@ -4049,4 +4072,41 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
}
|
||||
return renditionMapping;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.repo.dictionary.DictionaryListener#onDictionaryInit()
|
||||
*/
|
||||
@Override
|
||||
public void onDictionaryInit()
|
||||
{
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.repo.dictionary.DictionaryListener#afterDictionaryInit()
|
||||
*/
|
||||
@Override
|
||||
public void afterDictionaryInit()
|
||||
{
|
||||
this.ignoreChildrenQNames = new HashSet<QName>(this.ignoreChildren.size(), 1);
|
||||
for (String prefixString : this.ignoreChildren)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.ignoreChildrenQNames.add(QName.createQName(prefixString, this.namespaceService));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.warn("Couldn't create QName from " + prefixString, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.repo.dictionary.DictionaryListener#afterDictionaryDestroy()
|
||||
*/
|
||||
@Override
|
||||
public void afterDictionaryDestroy()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user