Publishing:

- Added initial icons to each of the supported channel types along with API (foundation and REST) to access them.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29249 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2011-07-21 12:39:18 +00:00
parent f07faf00b0
commit e16e19e2c5
14 changed files with 53 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ import java.util.Set;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.publishing.NodeSnapshot;
import org.alfresco.service.cmr.publishing.PublishingEvent;
import org.alfresco.service.cmr.publishing.PublishingPackageEntry;
@@ -62,6 +63,7 @@ public class PublishingEventProcessor
private NodeService nodeService;
private BehaviourFilter behaviourFilter;
private UrlShortener urlShortener;
private DictionaryService dictionaryService;
public void processEventNode(NodeRef eventNode)
{
@@ -223,6 +225,13 @@ public class PublishingEventProcessor
Map<QName, Serializable> publishProps = nodeService.getProperties(publishedNode);
Set<QName> propsToRemove = new HashSet<QName>(publishProps.keySet());
propsToRemove.removeAll(snapshotProps.keySet());
//We want to retain the published asset id and URL in the updated node...
snapshotProps.put(PublishingModel.PROP_ASSET_ID, nodeService.getProperty(publishedNode,
PublishingModel.PROP_ASSET_ID));
snapshotProps.put(PublishingModel.PROP_ASSET_URL, nodeService.getProperty(publishedNode,
PublishingModel.PROP_ASSET_URL));
for (QName propertyToRemove : propsToRemove)
{
nodeService.removeProperty(publishedNode, propertyToRemove);
@@ -238,6 +247,12 @@ public class PublishingEventProcessor
Set<QName> aspectsToRemove = nodeService.getAspects(publishedNode);
aspectsToRemove.removeAll(newAspects);
aspectsToRemove.remove(ASPECT_PUBLISHED);
aspectsToRemove.remove(PublishingModel.ASPECT_ASSET);
for (QName publishedAssetAspect : dictionaryService.getSubAspects(PublishingModel.ASPECT_ASSET, true))
{
aspectsToRemove.remove(publishedAssetAspect);
}
for (QName aspectToRemove : aspectsToRemove)
{
nodeService.removeAspect(publishedNode, aspectToRemove);
@@ -327,4 +342,9 @@ public class PublishingEventProcessor
{
this.urlShortener = urlShortener;
}
public void setDictionaryService(DictionaryService dictionaryService)
{
this.dictionaryService = dictionaryService;
}
}