List of usage examples for org.springframework.web.context.request RequestContextHolder currentRequestAttributes
public static RequestAttributes currentRequestAttributes() throws IllegalStateException
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * //from ww w . j av a 2s .co m * @param currentSchedone * @return */ public static String showSchedoneDeactivateIt(Schedone currentSchedone) { StringBuilder anchor = new StringBuilder("<a class=\"searchResult\" href=\""); anchor.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchor.append("/digitization/DeactivateSchedone.json?schedoneId="); anchor.append(currentSchedone.getSchedoneId()); anchor.append("\">Deactivate It</a>"); return anchor.toString(); }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * //from ww w .java 2 s. com * @param currentSchedone * @return */ public static String showSchedoneDescription(Schedone currentSchedone) { StringBuilder anchor = new StringBuilder("<a class=\"searchResult\" href=\""); anchor.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchor.append("/digitization/ShowSchedone.do?schedoneId="); anchor.append(currentSchedone.getSchedoneId()); anchor.append("\">" + currentSchedone.getDescrizioneContenuto() + "</a>"); return anchor.toString(); }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * //from w w w .ja v a 2 s . co m * @param currentSchedone * @return */ public static String showSchedoneEditIt(Schedone currentSchedone) { StringBuilder anchor = new StringBuilder("<a class=\"searchResult\" href=\""); anchor.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchor.append("/digitization/ShowSchedone.do?schedoneId="); anchor.append(currentSchedone.getSchedoneId()); anchor.append("\">Edit It</a>"); return anchor.toString(); }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * // w w w . ja v a 2s .c o m * @param currentSchedone * @return */ public static String showSchedoneMDP(Schedone currentSchedone) { StringBuilder anchor = new StringBuilder("<a class=\"searchResult\" href=\""); anchor.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchor.append("/digitization/ShowSchedone.do?schedoneId="); anchor.append(currentSchedone.getSchedoneId()); if (currentSchedone.getVolLetExt() == null) { anchor.append("\">" + currentSchedone.getVolNum() + "</a>"); } else { anchor.append("\">" + currentSchedone.getVolNum() + currentSchedone.getVolLetExt() + "</a>"); } return anchor.toString(); }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * /*from w ww .j ava 2 s . co m*/ * @param placeAllId * @param numberOfSenderDocumentsPlace * @param description * @return */ public static String showSenderDocumentsPlace(Integer placeAllId, Integer numberOfSenderDocumentsPlace, String description) { StringBuilder anchor = new StringBuilder("<a class=\"sender\" href=\""); anchor.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchor.append("/src/geobase/ShowSenderDocumentsPlace.do?placeAllId="); anchor.append(placeAllId); anchor.append("\">"); anchor.append(numberOfSenderDocumentsPlace); anchor.append(' '); anchor.append(description); anchor.append("</a>"); return anchor.toString(); }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * //from w w w. j a va 2 s. c o m * @param personId */ public static String showSenderDocumentsRelated(Integer personId, String description) { StringBuilder anchor = new StringBuilder("<a class=\"sender_docs\" href=\""); anchor.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchor.append("/src/peoplebase/ShowSenderDocumentsPerson.do?personId="); anchor.append(personId); anchor.append("\">"); anchor.append(description); anchor.append("</a>"); return anchor.toString(); }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * /*ww w .j a va 2s . c om*/ * @param titleOccsList * @return */ public static String showTitleOrOccupation(TitleOccsList titleOccsList) { StringBuilder anchor = new StringBuilder("<a class=\"searchResult\" href=\""); anchor.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchor.append("/src/peoplebase/ShowTitleOrOccupation.do?titleOccId="); anchor.append(titleOccsList.getTitleOccId()); anchor.append("\">" + titleOccsList.getTitleOcc() + "</a>"); return anchor.toString(); }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * //from ww w . j av a 2 s .co m * @param assignedPeople * @return */ public static String showTitleOrOccupationAssignedPeopleSearch(TitleOccsList titleOccsList, Long assignedPeople) { StringBuilder anchor = new StringBuilder("<a class=\"searchResult\" href=\""); anchor.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchor.append("/src/peoplebase/ShowTitleOrOccupation.do?titleOccId="); anchor.append(titleOccsList.getTitleOccId()); anchor.append("\">" + assignedPeople + "</a>"); return anchor.toString(); }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * /*w w w.ja v a2 s .c o m*/ * @param inputList * @param entryId * @return */ public static List<String> showTopicsDocumentRelated(List<String> inputList, Integer entryId) { if (inputList == null) return null; ArrayList<String> retValue = new ArrayList<String>(inputList.size()); StringBuilder anchorBegin = new StringBuilder("<a title=\""); if (!inputList.get(inputList.size() - 1).contains("NNF")) anchorBegin.append(inputList.get(inputList.size() - 1).toString().substring(3, inputList.get(inputList.size() - 1).toString().indexOf("</b>"))); else anchorBegin.append("DocId#" + entryId + " - " + inputList.get(inputList.size() - 1).toString() .substring(3, inputList.get(inputList.size() - 1).toString().indexOf("</b>"))); anchorBegin.append("\" class=\"showResult\" id=\"docId" + entryId + "\" href=\""); anchorBegin.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchorBegin.append("/src/docbase/CompareDocument.do?entryId="); anchorBegin.append(entryId); anchorBegin.append("\">"); String hrefEnd = "</a>"; for (int i = 0; i < inputList.size(); i++) { retValue.add(anchorBegin + inputList.get(i) + hrefEnd); } return retValue; }
From source file:org.medici.bia.common.util.HtmlUtils.java
/** * /*from www . j a v a 2 s. c o m*/ * @param inputList * @param entryId * @return */ public static List<String> showTopicsDocumentRelated(List<String> inputList, String place) { if (inputList == null) return null; ArrayList<String> retValue = new ArrayList<String>(inputList.size()); StringBuilder anchorBegin = new StringBuilder("<a title=\""); anchorBegin.append(inputList.get(0)); anchorBegin.append("\" class=\"showResultTopicsDoc\" href=\""); anchorBegin.append(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest() .getContextPath()); anchorBegin.append("/src/docbase/LinkedDocumentsTopic.do?placeAllId="); anchorBegin.append(place + "&topicTitle="); anchorBegin.append(inputList.get(0)); anchorBegin.append("\">"); String hrefEnd = "</a>"; for (int i = 0; i < inputList.size(); i++) { retValue.add(anchorBegin + inputList.get(i) + hrefEnd); } return retValue; }