mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
. Workflow Command Servlet implementation
. Refactored common simple workflow code into a util class. . Example template that demonstrates both querying for workflow information on a document (useful anyway) and executes the servlet to perform both the Approve and Reject actions if appropriate for the document. . TemplateNode template API object now exposes the browse navigation servlet URL for a Space as the "url" API call . Fix long standing bug in UIRichList (since PR1!) - subtle behaviour issue where under very high server loads, the richlist component would render the wrong number of items per row. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2590 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -66,6 +66,7 @@ public final class TemplateNode implements Serializable
|
|||||||
private final static String NAMESPACE_BEGIN = "" + QName.NAMESPACE_BEGIN;
|
private final static String NAMESPACE_BEGIN = "" + QName.NAMESPACE_BEGIN;
|
||||||
private final static String CONTENT_DEFAULT_URL = "/download/direct/{0}/{1}/{2}/{3}";
|
private final static String CONTENT_DEFAULT_URL = "/download/direct/{0}/{1}/{2}/{3}";
|
||||||
private final static String CONTENT_PROP_URL = "/download/direct/{0}/{1}/{2}/{3}?property={4}";
|
private final static String CONTENT_PROP_URL = "/download/direct/{0}/{1}/{2}/{3}?property={4}";
|
||||||
|
private final static String FOLDER_BROWSE_URL = "/navigate/browse/{0}/{1}/{2}";
|
||||||
|
|
||||||
/** The children of this node */
|
/** The children of this node */
|
||||||
private List<TemplateNode> children = null;
|
private List<TemplateNode> children = null;
|
||||||
@@ -502,22 +503,34 @@ public final class TemplateNode implements Serializable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return url to the content stream for this node for the default content property
|
* @return For a content document, this method returns the URL to the content stream for
|
||||||
* (@see ContentModel.PROP_CONTENT)
|
* the default content property (@see ContentModel.PROP_CONTENT)
|
||||||
|
* <p>
|
||||||
|
* For a container node, this method return the URL to browse to the folder in the web-client
|
||||||
*/
|
*/
|
||||||
public String getUrl()
|
public String getUrl()
|
||||||
{
|
{
|
||||||
try
|
if (getIsDocument() == true)
|
||||||
{
|
{
|
||||||
return MessageFormat.format(CONTENT_DEFAULT_URL, new Object[] {
|
try
|
||||||
nodeRef.getStoreRef().getProtocol(),
|
{
|
||||||
nodeRef.getStoreRef().getIdentifier(),
|
return MessageFormat.format(CONTENT_DEFAULT_URL, new Object[] {
|
||||||
nodeRef.getId(),
|
nodeRef.getStoreRef().getProtocol(),
|
||||||
StringUtils.replace(URLEncoder.encode(getName(), "UTF-8"), "+", "%20") } );
|
nodeRef.getStoreRef().getIdentifier(),
|
||||||
|
nodeRef.getId(),
|
||||||
|
StringUtils.replace(URLEncoder.encode(getName(), "UTF-8"), "+", "%20") } );
|
||||||
|
}
|
||||||
|
catch (UnsupportedEncodingException err)
|
||||||
|
{
|
||||||
|
throw new TemplateException("Failed to encode content URL for node: " + nodeRef, err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException err)
|
else
|
||||||
{
|
{
|
||||||
throw new TemplateException("Failed to encode content URL for node: " + nodeRef, err);
|
return MessageFormat.format(FOLDER_BROWSE_URL, new Object[] {
|
||||||
|
nodeRef.getStoreRef().getProtocol(),
|
||||||
|
nodeRef.getStoreRef().getIdentifier(),
|
||||||
|
nodeRef.getId() } );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user