示例#1
0
 /**
  * Returns the URL to the resource of this bean (mapped and with the appropriate extension).
  *
  * @see LinkUtil#getUrl(SlingHttpServletRequest, String)
  */
 public String getUrl() {
   if (url == null) {
     RequestHandle request = getRequest();
     url = LinkUtil.getUrl(request, getPath(), request.getSelectors(), null);
   }
   return url;
 }
示例#2
0
 public String getThumbnailUrl() {
   if (thumbnailUrl == null) {
     StringBuilder builder = new StringBuilder();
     try {
       String path = PackageUtil.getThumbnailPath(pckgDef);
       if (StringUtils.isNotBlank(path)) {
         builder.append(LinkUtil.getUrl(request, path));
       }
     } catch (RepositoryException rex) {
       LOG.error(rex.getMessage(), rex);
     }
     thumbnailUrl = builder.toString();
   }
   return thumbnailUrl;
 }
示例#3
0
 public String getAuditLogUrl() {
   if (auditLogUrl == null) {
     auditLogUrl = LinkUtil.getUrl(getRequest(), AUDIT_LOG_BASE + getPath());
   }
   return auditLogUrl;
 }
示例#4
0
 public String getDownloadUrl() {
   if (downloadUrl == null) {
     downloadUrl = LinkUtil.getUrl(getRequest(), PackageUtil.getDownloadUrl(pckg));
   }
   return downloadUrl;
 }
示例#5
0
 @Override
 public String getUrl() {
   return LinkUtil.getUrl(getRequest(), PackagesServlet.SERVLET_PATH + getPath());
 }