/** * This is a short cut method for creating a new message object. This * version allows the callie to specify a particular catalogue overriding * the default catalogue supplied. * * @param catalogue * The catalogue where translations will be located. * @param key * The catalogue key used to look up a translation within the * catalogue. * @return A new message object. */ public static Message message(String catalogue, String key) { return new Message(catalogue, key); }
/** * return the notice message */ public String getMessage() { if (this.message != null) { return this.message.getKey(); } return null; }
/** * If an alert is activated then add a count down message. */ public void addPageMeta(PageMeta pageMeta) throws WingException { if (active) { Metadata alert = pageMeta.addMetadata("alert","message"); long time = countDownToo - System.currentTimeMillis(); if (time > 0) { // from milliseconds to minutes time = time / (60*1000); alert.addContent(T_COUNTDOWN.parameterize(time)); } alert.addContent(message); } }
Iterator<CCLicense> iterator = cclookup.getLicenses(ConfigurationManager.getProperty("default.locale")).iterator(); selectList.addOption(T_select_change.getKey(), T_select_change); while (iterator.hasNext()) { CCLicense cclicense = iterator.next(); selectList.addOption(T_no_license.getKey(), T_no_license); if (selectedLicense != null) { session.getAttribute("ccError") != null) statusList.addItem().addHighlight("error").addContent(T_ccws_error.parameterize((String)session.getAttribute("ccError"))); session.removeAttribute("ccError"); session.removeAttribute("isFieldRequired");
String catalogue = message.getCatalogue(); Object[] dictionaryParameters = message.getDictionaryParameters(); sendCharacters(contentHandler, message.getKey()); endElement(contentHandler, namespaces, WingConstants.I18N, E_TEXT); sendCharacters(contentHandler, message.getKey()); endElement(contentHandler, namespaces, WingConstants.I18N, E_TEXT);
unauthorized = body.addDivision("unauthorized-resource", "primary"); unauthorized.setHead(T_head_community); unauthorized.addPara(T_para_community.parameterize(community.getMetadata("name"))); unauthorized = body.addDivision("unauthorized-resource", "primary"); unauthorized.setHead(T_head_collection); unauthorized.addPara(T_para_collection.parameterize(collection.getMetadata("name"))); unauthorized.addPara(T_para_bitstream.parameterize(identifier)); unauthorized.addPara(T_para_item.parameterize(identifier)); unauthorized.addPara("item_status", status.getKey()).addContent(status);
cocoon.addLabel(T_COCOON_MAIN_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storeDefault.hashCode()))); cocoon.addLabel(T_COCOON_PERSISTENT_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storePersistent.hashCode()))); cocoon.addItem(String.valueOf(this.storePersistent.size())); cocoon.addLabel(T_COCOON_TRANS_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(store.hashCode()))); cocoon.addItem(String.valueOf(store.size()));
/** * Create a progress list for the registration workflow. * * @param form The division of the current workflow step. * @param step The current step of the workflow (-1 if no step) * */ public static void registrationProgressList(Division form, int step) throws WingException { List progress = form.addList("registration-progress", List.TYPE_PROGRESS); new Message("default","xmlui.EPerson.EPersonUtils.register_verify_email"); progress.addItem("register-verify-email", render(step, 1)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.register_verify_email")); progress.addItem("register-create-profile", render(step, 2)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.register_create_profile")); progress.addItem("register-finished", render(step, 3)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.register_finished")); }
/** * Return the notice header */ public String getHeader() { if (this.header != null) { return this.header.getKey(); } return null; }
public void addBody(Body body) throws WingException { Division verify = body.addDivision("verify-email","primary"); verify.setHead(T_head); if (forgot) { EPersonUtils.forgottProgressList(verify, 1); } else { EPersonUtils.registrationProgressList(verify,1); } verify.addPara(T_para.parameterize(email)); }
/** * Create a progress list for the forgot password workflow. * * @param form The division of the current workflow step * @param step The current step of the workflow (-1 if no step) */ public static void forgottProgressList(Division form, int step) throws WingException { List progress = form.addList("forgot-password-progress", List.TYPE_PROGRESS); progress.addItem("forgot-verify-email", render(step, 1)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.forgot_verify_email")); progress.addItem("forgot-reset-passowrd", render(step, 2)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.forgot_reset_password")); progress.addItem("forgot-finished", render(step, 3)).addContent( new Message("default","xmlui.EPerson.EPersonUtils.forgot_finished")); }
public void addBody(Body body) throws WingException, SQLException, AuthorizeException { String role = parameters.getParameter("role", null); int groupID = parameters.getParameterAsInteger("groupID", -1); Group toBeDeleted = Group.find(context, groupID); // DIVISION: main Division main = body.addInteractiveDivision("collection-role-delete",contextPath+"/admin/collection",Division.METHOD_POST,"primary administrative collection"); main.setHead(T_main_head.parameterize(role)); // Different help message for the default read group to enforce its non-retroactive nature if ("DEFAULT_READ".equals(role)) { main.addPara(T_main_para_read.parameterize(toBeDeleted.getName())); } else { main.addPara(T_main_para.parameterize(toBeDeleted.getName())); } Para buttonList = main.addPara(); buttonList.addButton("submit_confirm").setValue(T_submit_confirm); buttonList.addButton("submit_cancel").setValue(T_submit_cancel); main.addHidden("administrative-continue").setValue(knot.getId()); } }
result.setMessage(new Message("default","The policies were added successfully!"));
.parameterize(scopeName); .parameterize(scopeName); .parameterize(scopeName);
flowResult.setHeader(new Message("default", "Task: " + getUITaskName(taskName))); flowResult.setMessage(T_curate_success_notice); flowResult.setCharacters("STATUS: " + status + ", RESULT: " + result); flowResult.setHeader(new Message("default", "Task: " + getUITaskName(taskName))); flowResult.setMessage(T_curate_fail_notice); flowResult.setCharacters("STATUS: Failure, RESULT: " + result);
.parameterize(scopeName); .parameterize(scopeName); .parameterize(scopeName);
public void addBody(Body body) throws WingException, SQLException, AuthorizeException { String role = parameters.getParameter("role", null); int groupID = parameters.getParameterAsInteger("groupID", -1); Group toBeDeleted = Group.find(context, groupID); // DIVISION: main Division main = body.addInteractiveDivision("community-role-delete",contextPath+"/admin/community",Division.METHOD_POST,"primary administrative community"); main.setHead(T_main_head.parameterize(role)); main.addPara(T_main_para.parameterize(toBeDeleted.getName())); Para buttonList = main.addPara(); buttonList.addButton("submit_confirm").setValue(T_submit_confirm); buttonList.addButton("submit_cancel").setValue(T_submit_cancel); main.addHidden("administrative-continue").setValue(knot.getId()); } }
result.setMessage(new Message("default","The policies for the selected collections were cleared."));
.parameterize(scopeName, value); .parameterize(scopeName, value); .parameterize(scopeName, value);