Changed ThumbnailServiceImpl to create renditions of type cm:thumbnail and set the thumbnail name property on them correctly.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19184 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2010-03-10 12:59:21 +00:00
parent 4835da3dce
commit b2d3946da1
12 changed files with 332 additions and 116 deletions

View File

@@ -16,7 +16,6 @@
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.rendition.executer;
import static org.alfresco.service.cmr.rendition.RenditionService.*;
@@ -326,7 +325,7 @@ public abstract class AbstractRenderingEngine extends ActionExecuterAbstractBase
* @param renditionDefinition
* @return
*/
public QName getRenditionNodeType(RenditionDefinition renditionDefinition)
private QName getRenditionNodeType(RenditionDefinition renditionDefinition)
{
return getParamWithDefault(PARAM_RENDITION_NODETYPE, defaultRenditionNodeType, renditionDefinition);
}
@@ -378,7 +377,7 @@ public abstract class AbstractRenderingEngine extends ActionExecuterAbstractBase
// The ThumbnailService puts a cm:name property on its thumbnail nodes.
Map<QName, Serializable> nodeProps = new HashMap<QName, Serializable>();
nodeProps.put(ContentModel.PROP_NAME, renditionName.getLocalName());
nodeProps.put(ContentModel.PROP_CONTENT_PROPERTY_NAME, getDefaultRenditionContentProp());
nodeProps.put(ContentModel.PROP_CONTENT_PROPERTY_NAME, getRenditionContentProp(renditionDefinition));
QName assocName = QName.createQName(NamespaceService.RENDITION_MODEL_1_0_URI, GUID.generate());
NodeRef parentNode = renditionDefinition.getRenditionParent();
QName assocType = renditionDefinition.getRenditionAssociationType();
@@ -387,6 +386,11 @@ public abstract class AbstractRenderingEngine extends ActionExecuterAbstractBase
return childAssoc;
}
private Serializable getRenditionContentProp(RenditionDefinition renditionDefinition)
{
return getParamWithDefault(PARAM_TARGET_CONTENT_PROPERTY, getDefaultRenditionContentProp(), renditionDefinition);
}
/**
* Gets the value for the named parameter. Checks the type of the parameter
* is correct and throws a {@link RenditionServiceException} if it isn't.