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 47 48 public class CmsXmlWpButtonsDefFile extends A_CmsXmlContent { 49 50 53 54 public CmsXmlWpButtonsDefFile() throws CmsException { 55 super(); 56 } 57 58 65 66 public CmsXmlWpButtonsDefFile(CmsObject cms, CmsFile file) throws CmsException { 67 super(); 68 init(cms, file); 69 } 70 71 78 79 public CmsXmlWpButtonsDefFile(CmsObject cms, String filename) throws CmsException { 80 super(); 81 init(cms, filename); 82 } 83 84 89 90 public String getButton(String name, String action, String alt, 91 String href, Object callingObject) throws CmsException { 92 setData("name", name); 93 setData("action", action); 94 setData("alt", alt); 95 setData("href", href); 96 return getProcessedDataValue("defaultbutton", callingObject); 97 } 98 99 104 105 public String getButtonSeparator(Object callingObject) throws CmsException { 106 return getProcessedDataValue("buttonseparator", callingObject); 107 } 108 109 114 115 public String getButtonSubmit(String name, String action, String value, 116 String style, String width) throws CmsException { 117 setData(CmsWorkplaceDefault.C_BUTTON_NAME, name); 118 setData(CmsWorkplaceDefault.C_BUTTON_ACTION, action); 119 setData(CmsWorkplaceDefault.C_BUTTON_VALUE, value); 120 setData(CmsWorkplaceDefault.C_BUTTON_STYLE, style); 121 setData(CmsWorkplaceDefault.C_BUTTON_WIDTH, width); 122 return getProcessedDataValue("submitbutton"); 123 } 124 125 130 131 public String getButtonText(String name, String action, String value, 132 String style, String width) throws CmsException { 133 setData(CmsWorkplaceDefault.C_BUTTON_NAME, name); 134 setData(CmsWorkplaceDefault.C_BUTTON_ACTION, action); 135 setData(CmsWorkplaceDefault.C_BUTTON_VALUE, value); 136 setData(CmsWorkplaceDefault.C_BUTTON_STYLE, style); 137 setData(CmsWorkplaceDefault.C_BUTTON_WIDTH, width); 138 return getProcessedDataValue("textbutton"); 139 } 140 141 145 146 public String getContentDescription() { 147 return "OpenCms workplace buttons definition"; 148 } 149 150 155 156 public String getDeactivatedButton(String name, String action, String alt, String href, 157 Object callingObject) throws CmsException { 158 setData("name", name); 159 setData("action", action); 160 setData("alt", alt); 161 setData("href", href); 162 return getProcessedDataValue("deactivatedbutton", callingObject); 163 } 164 165 170 171 public String getJavascriptButton(String name, String action, String alt, 172 String href, Object callingObject) throws CmsException { 173 setData("name", name); 174 setData("action", action); 175 setData("alt", alt); 176 setData("href", href); 177 return getProcessedDataValue("javascriptbutton", callingObject); 178 } 179 180 184 185 public String getXmlDocumentTagName() { 186 return "WP_BUTTONS"; 187 } 188 } 189
| Popular Tags
|