public static String createOutcomeTextForAIP(IndexedAIP item, String actionMessage) { SimpleDateFormat format = new SimpleDateFormat(RodaConstants.SIMPLE_DATE_FORMATTER); StringBuilder outcomeText = new StringBuilder("Archival Information Package [id: ").append(item.getId()); if (StringUtils.isNotBlank(item.getTitle())) { outcomeText.append("; title: ").append(item.getTitle()); } if (StringUtils.isNotBlank(item.getLevel())) { outcomeText.append("; level: ").append(item.getLevel()); } if (item.getDateInitial() != null) { outcomeText.append("; initial date: ").append(format.format(item.getDateInitial())); } if (item.getDateFinal() != null) { outcomeText.append("; end date: ").append(format.format(item.getDateFinal())); } outcomeText.append("] ").append(actionMessage); return outcomeText.toString(); } }
/** * Constructs a new {@link IndexedAIP} cloning the one given by argument. * * @param other * the {@link IndexedAIP} to be cloned. */ public IndexedAIP(IndexedAIP other) { this(other.getId(), other.getState(), other.getType(), other.getLevel(), other.getTitle(), other.getDateInitial(), other.getDateFinal(), other.getDescription(), other.getParentID(), other.getAncestors(), other.getPermissions(), other.getNumberOfSubmissionFiles(), other.getNumberOfDocumentationFiles(), other.getNumberOfSchemaFiles(), other.getHasRepresentations(), other.getGhost()); }