* For a container node, this method return the URL to browse to the folder in the web-client */ public String getUrl() { if (getIsDocument() == true) { TemplateContentData content = (TemplateContentData)this.getProperties().get(ContentModel.PROP_CONTENT); return content != null ? content.getUrl() : ""; } else { return MessageFormat.format(FOLDER_BROWSE_URL, new Object[] { getNodeRef().getStoreRef().getProtocol(), getNodeRef().getStoreRef().getIdentifier(), getNodeRef().getId() } ); } } /** * @return For a content document, this method returns the download URL to the content for * the default content property (@see ContentModel.PROP_CONTENT) *
* For a container node, this method returns an empty string
*/
public String getDownloadUrl()
{
if (getIsDocument() == true)
{
TemplateContentData content = (TemplateContentData)this.getProperties().get(ContentModel.PROP_CONTENT);
return content != null ? content.getDownloadUrl() : "";
}
else
{
return "";
}
}
public String getServiceUrl()
{
if (getIsDocument() == true)
{
TemplateContentData content = (TemplateContentData)this.getProperties().get(ContentModel.PROP_CONTENT);
return content != null ? content.getServiceUrl() : "";
}
else
{
return "";
}
}
/**
* @return The WebDav cm:name based path to the content for the default content property
* (@see ContentModel.PROP_CONTENT)
*/
public String getWebdavUrl()
{
try
{
if (getIsContainer() || getIsDocument())
{
List