mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Fix for ALF-10826
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32797 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -36,6 +36,7 @@ import org.alfresco.query.CannedQueryPageDetails;
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.model.filefolder.HiddenAspect;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
@@ -96,6 +97,7 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
private NamespaceService namespaceService;
|
||||
private SiteService siteService;
|
||||
private ContentService contentService;
|
||||
private HiddenAspect hiddenAspect;
|
||||
|
||||
|
||||
/**
|
||||
@@ -145,6 +147,11 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
{
|
||||
this.contentService = contentService;
|
||||
}
|
||||
|
||||
public void setHiddenAspect(HiddenAspect hiddenAspect)
|
||||
{
|
||||
this.hiddenAspect = hiddenAspect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last modified timestamp for the document.
|
||||
@@ -354,9 +361,7 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
}
|
||||
FileInfo fileInfo = fileFolderService.create(
|
||||
parentFolder.getNodeRef(), encpath.substring(off + 1), ContentModel.TYPE_CONTENT);
|
||||
Map<QName, Serializable> aspectProperties = new HashMap<QName, Serializable>(1, 1.0f);
|
||||
aspectProperties.put(ContentModel.PROP_IS_INDEXED, false);
|
||||
nodeService.addAspect(fileInfo.getNodeRef(), ContentModel.ASPECT_INDEX_CONTROL, aspectProperties);
|
||||
|
||||
contentService.getWriter(
|
||||
fileInfo.getNodeRef(), ContentModel.PROP_CONTENT, true).putContent(content);
|
||||
if (logger.isDebugEnabled())
|
||||
@@ -787,6 +792,10 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
properties.put(ContentModel.PROP_NAME, (Serializable) SURF_CONFIG);
|
||||
ChildAssociationRef ref = this.unprotNodeService.createNode(
|
||||
rootRef, ContentModel.ASSOC_CONTAINS, assocQName, ContentModel.TYPE_FOLDER, properties);
|
||||
|
||||
// surf-config needs to be hidden
|
||||
hiddenAspect.hideNode(ref.getChildRef());
|
||||
|
||||
surfConfigRef = ref.getChildRef();
|
||||
Map<QName, Serializable> aspectProperties = new HashMap<QName, Serializable>(1, 1.0f);
|
||||
aspectProperties.put(ContentModel.PROP_IS_INDEXED, false);
|
||||
@@ -794,7 +803,7 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
}
|
||||
return surfConfigRef;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the Sites folder root node reference
|
||||
*/
|
||||
|
Reference in New Issue
Block a user