List of usage examples for org.apache.commons.lang3 StringUtils substringAfterLast
public static String substringAfterLast(final String str, final String separator)
Gets the substring after the last occurrence of a separator.
From source file:org.kuali.kra.award.detailsdates.AddAwardTransferringSponsorEvent.java
/** * Logs the event type and some information about the associated sponsor *///from ww w . j a v a2 s . c om protected void logEvent() { if (LOG.isDebugEnabled()) { StringBuilder logMessage = new StringBuilder( StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); if (getSponsorToBecomeAwardTransferringSponsor() == null) { logMessage.append("null Award Transferring Sponsor"); } else { logMessage.append(getSponsorToBecomeAwardTransferringSponsor().toString()); } LOG.debug(logMessage); } }
From source file:org.kuali.kra.external.Cfda.service.impl.CfdaServiceImpl.java
/** * This method gets the url from the parameter and creates the fileName and * the actual URL used to FTP.// w w w. j a v a 2s . com */ protected void createGovURL() { // Example url ftp://ftp.cfda.gov/programs09187.csv String url = getParameterService().getParameterValueAsString(Constants.MODULE_NAMESPACE_AWARD, Constants.PARAMETER_COMPONENT_DOCUMENT, Constants.CFDA_GOV_URL_PARAMETER); String fileName = StringUtils.substringAfterLast(url, "/"); url = StringUtils.substringBeforeLast(url, "/"); if (StringUtils.contains(url, FTP_PREFIX)) { url = StringUtils.remove(url, FTP_PREFIX); } Calendar calendar = dateTimeService.getCurrentCalendar(); // need to pull off the '20' in 2009 String year = "" + calendar.get(Calendar.YEAR); year = year.substring(2, 4); fileName = fileName + year; // the last 3 numbers in the file name are the day of the year, but the files are from "yesterday" fileName = fileName + String.format("%03d", calendar.get(Calendar.DAY_OF_YEAR) - 1); fileName = fileName + ".csv"; setGovURL(url); setCfdaFileName(fileName); }
From source file:org.kuali.kra.iacuc.actions.assignCmt.IacucProtocolAssignCmtEvent.java
@Override protected void logEvent() { StringBuffer logMessage = new StringBuffer(StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); // vary logging detail as needed if (this.actionBean == null) { logMessage.append("null actionBean"); } else {/*w w w . j av a 2 s . c o m*/ logMessage.append(actionBean.toString()); } LOG.debug(logMessage); }
From source file:org.kuali.kra.irb.actions.correction.ProtocolAdminCorrectionEvent.java
@Override protected void logEvent() { StringBuffer logMessage = new StringBuffer(StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); if (this.actionBean == null) { logMessage.append("null actionBean"); } else {/*from w w w . j a va 2s .c o m*/ logMessage.append(actionBean.toString()); } LOG.debug(logMessage); }
From source file:org.kuali.kra.irb.actions.decision.CommitteeDecisionRecuserEvent.java
@Override protected void logEvent() { StringBuffer logMessage = new StringBuffer(StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); // vary logging detail as needed if (this.actionBean == null) { logMessage.append("null actionBean"); } else {/*from www . ja v a2s . c o m*/ logMessage.append(actionBean.toString()); } LOG.debug(logMessage); }
From source file:org.kuali.kra.irb.actions.modifysubmission.ProtocolModifySubmissionEvent.java
@Override protected void logEvent() { StringBuffer logMessage = new StringBuffer(StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); if (this.actionBean == null) { logMessage.append("null actionBean"); } else {/*from w w w. j av a 2 s .c o m*/ logMessage.append(actionBean.toString()); } LOG.debug(logMessage); }
From source file:org.kuali.kra.irb.actions.noreview.ProtocolReviewNotRequiredEvent.java
@Override protected void logEvent() { StringBuffer logMessage = new StringBuffer(StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); if (this.actionBean == null) { logMessage.append("null actionBean"); } else {/*from w w w. j ava 2s. co m*/ logMessage.append(actionBean.toString()); } LOG.debug(logMessage); }
From source file:org.kuali.kra.protocol.actions.decision.CommitteeDecisionAbstainerEventBase.java
@Override protected void logEvent() { StringBuffer logMessage = new StringBuffer(StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); // vary logging detail as needed if (this.actionBean == null) { logMessage.append("null actionBean"); } else {/* w ww . j a v a 2s. com*/ logMessage.append(actionBean.toString()); } getLOGHook().debug(logMessage); }
From source file:org.kuali.kra.protocol.actions.decision.CommitteeDecisionEventBase.java
@Override protected void logEvent() { StringBuffer logMessage = new StringBuffer(StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); // vary logging detail as needed if (this.actionBean == null) { logMessage.append("null actionBean"); } else {/*from w w w . j a v a 2 s. co m*/ logMessage.append(actionBean.toString()); } getLOGHook().debug(logMessage); }
From source file:org.kuali.kra.protocol.actions.submit.ProtocolSubmitActionEventBase.java
@Override protected void logEvent() { StringBuffer logMessage = new StringBuffer(StringUtils.substringAfterLast(this.getClass().getName(), ".")); logMessage.append(" with "); // vary logging detail as needed if (this.submitAction == null) { logMessage.append("null submitAction"); } else {/* w ww . j a v a 2 s . c o m*/ logMessage.append(this.submitAction.toString()); } getLOGHook().debug(logMessage); }