1 28 29 30 package com.opencms.workplace; 31 32 import org.opencms.file.CmsFile; 33 import org.opencms.file.CmsObject; 34 import org.opencms.main.CmsException; 35 36 import com.opencms.template.A_CmsXmlContent; 37 38 46 47 public class CmsXmlWpBoxDefFile extends A_CmsXmlContent { 48 49 52 53 public CmsXmlWpBoxDefFile() throws CmsException { 54 super(); 55 } 56 57 64 65 public CmsXmlWpBoxDefFile(CmsObject cms, CmsFile file) throws CmsException { 66 super(); 67 init(cms, file); 68 } 69 70 77 78 public CmsXmlWpBoxDefFile(CmsObject cms, String filename) throws CmsException { 79 super(); 80 init(cms, filename); 81 } 82 83 87 88 public String getContentDescription() { 89 return "OpenCms workplace messagebox"; 90 } 91 92 public String getErrorpage(String title, String message, String reason, 93 String suggestion, String link, String msgReason, String msgButton) throws CmsException { 94 setData(CmsWorkplaceDefault.C_ERROR_TITLE, title); 95 setData(CmsWorkplaceDefault.C_ERROR_MESSAGE, message); 96 setData(CmsWorkplaceDefault.C_ERROR_REASON, reason); 97 setData(CmsWorkplaceDefault.C_ERROR_SUGGESTION, suggestion); 98 setData(CmsWorkplaceDefault.C_ERROR_LINK, link); 99 setData(CmsWorkplaceDefault.C_ERROR_MSG_REASON, msgReason); 100 setData(CmsWorkplaceDefault.C_ERROR_MSG_BUTTON, msgButton); 101 return getProcessedDataValue(CmsWorkplaceDefault.C_TAG_ERRORPAGE); 102 } 103 104 116 117 129 130 public String getMessagebox(String title, String message1, String message2, 131 String button1, String button2, String link1, String link2) throws CmsException { 132 setData(CmsWorkplaceDefault.C_MESSAGE_TITLE, title); 133 setData(CmsWorkplaceDefault.C_MESSAGE_MESSAGE1, message1); 134 setData(CmsWorkplaceDefault.C_MESSAGE_MESSAGE2, message2); 135 setData(CmsWorkplaceDefault.C_MESSAGE_BUTTON1, button1); 136 setData(CmsWorkplaceDefault.C_MESSAGE_BUTTON2, button2); 137 setData(CmsWorkplaceDefault.C_MESSAGE_LINK1, link1); 138 setData(CmsWorkplaceDefault.C_MESSAGE_LINK2, link2); 139 return getProcessedDataValue(CmsWorkplaceDefault.C_TAG_MESSAGEBOX); 140 } 141 142 146 147 public String getXmlDocumentTagName() { 148 return "WP_MESSAGE"; 149 } 150 } 151
| Popular Tags
|