1 23 24 package org.infoglue.cms.applications.contenttool.actions; 25 26 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction; 27 import org.infoglue.cms.controllers.kernel.impl.simple.DigitalAssetController; 28 29 34 35 public class DownloadAssetAction extends InfoGlueAbstractAction 36 { 37 private static final long serialVersionUID = 1L; 38 39 private Integer contentId; 40 private Integer languageId; 41 private String assetKey; 42 43 protected String doExecute() throws Exception 44 { 45 String assetUrl = ""; 46 47 try 48 { 49 assetUrl = DigitalAssetController.getDigitalAssetUrl(contentId, languageId, assetKey, true); 50 this.getResponse().sendRedirect(assetUrl); 51 } 52 catch(Exception e) 53 { 54 e.printStackTrace(); 55 } 56 57 return NONE; 58 } 59 60 public String getAssetKey() 61 { 62 return assetKey; 63 } 64 65 public void setAssetKey(String assetKey) 66 { 67 this.assetKey = assetKey; 68 } 69 70 public Integer getContentId() 71 { 72 return contentId; 73 } 74 75 public void setContentId(Integer contentId) 76 { 77 this.contentId = contentId; 78 } 79 80 public Integer getLanguageId() 81 { 82 return languageId; 83 } 84 85 public void setLanguageId(Integer languageId) 86 { 87 this.languageId = languageId; 88 } 89 } 90 | Popular Tags |