/** * @see com.google.common.base.Predicate#apply(java.lang.Object) */ public boolean apply(CmsAttributeComparison input) { return !Objects.equal(input.getVersion1(), input.getVersion2()); } }
/** * Gets the value for the first version.<p> * * @return the first version's value */ @Column(header = "V1 (%(v1))", order = 20) public String getV1() { return m_comp.getVersion1(); }
/** * Converts an attribute list to a string.<p> * * @param properties a list of compared properties to be converted to a string * @return a string respresentation of the attribute list */ public String[] getPropertiesAsString(List<?> properties) { Iterator<?> i = properties.iterator(); StringBuffer res1 = new StringBuffer(512); StringBuffer res2 = new StringBuffer(512); while (i.hasNext()) { CmsAttributeComparison compare = (CmsAttributeComparison)i.next(); res1.append(compare.getName()).append(": ").append(compare.getVersion1()).append("\n"); res2.append(compare.getName()).append(": ").append(compare.getVersion2()).append("\n"); } return new String[] {res1.toString(), res2.toString()}; }
/** * Converts an attribute list to a string.<p> * * @param properties a list of compared properties to be converted to a string * @return a string respresentation of the attribute list */ public String[] getPropertiesAsString(List properties) { Iterator i = properties.iterator(); StringBuffer res1 = new StringBuffer(512); StringBuffer res2 = new StringBuffer(512); while (i.hasNext()) { CmsAttributeComparison compare = (CmsAttributeComparison)i.next(); res1.append(compare.getName()).append(": ").append(compare.getVersion1()).append("\n"); res2.append(compare.getName()).append(": ").append(compare.getVersion2()).append("\n"); } return new String[] {res1.toString(), res2.toString()}; }
/** * Converts an attribute list to a string.<p> * * @param attributes a list of compared attributes to be converted to a string * @return a string respresentation of the attribute list */ public String[] getAttributesAsString(List attributes) { Iterator i = attributes.iterator(); StringBuffer res1 = new StringBuffer(512); StringBuffer res2 = new StringBuffer(512); while (i.hasNext()) { CmsAttributeComparison compare = (CmsAttributeComparison)i.next(); res1.append(key(compare.getName())).append(": ").append(compare.getVersion1()).append("\n"); res2.append(key(compare.getName())).append(": ").append(compare.getVersion2()).append("\n"); } return new String[] {res1.toString(), res2.toString()}; }
/** * Converts an attribute list to a string.<p> * * @param attributes a list of compared attributes to be converted to a string * @return a string respresentation of the attribute list */ public String[] getAttributesAsString(List<?> attributes) { Iterator<?> i = attributes.iterator(); StringBuffer res1 = new StringBuffer(512); StringBuffer res2 = new StringBuffer(512); while (i.hasNext()) { CmsAttributeComparison compare = (CmsAttributeComparison)i.next(); res1.append(key(compare.getName())).append(": ").append(compare.getVersion1()).append("\n"); res2.append(key(compare.getName())).append(": ").append(compare.getVersion2()).append("\n"); } return new String[] {res1.toString(), res2.toString()}; }
CmsListItem item = getList().newItem(comparison.getName()); item.set(LIST_COLUMN_PROPERTY_NAME, comparison.getName()); item.set(LIST_COLUMN_VERSION_1, CmsStringUtil.trimToSize(comparison.getVersion1(), TRIM_AT_LENGTH)); item.set(LIST_COLUMN_VERSION_2, CmsStringUtil.trimToSize(comparison.getVersion2(), TRIM_AT_LENGTH)); if (CmsResourceComparison.TYPE_ADDED.equals(comparison.getStatus())) {
CmsListItem item = getList().newItem(comparison.getName()); item.set(LIST_COLUMN_PROPERTY_NAME, comparison.getName()); item.set(LIST_COLUMN_VERSION_1, CmsStringUtil.trimToSize(comparison.getVersion1(), TRIM_AT_LENGTH)); item.set(LIST_COLUMN_VERSION_2, CmsStringUtil.trimToSize(comparison.getVersion2(), TRIM_AT_LENGTH)); if (CmsResourceComparison.TYPE_ADDED.equals(comparison.getStatus())) {
CmsListItem item = getList().newItem(comparison.getName()); item.set(LIST_COLUMN_PROPERTY_NAME, key(comparison.getName())); item.set(LIST_COLUMN_VERSION_1, CmsStringUtil.trimToSize(comparison.getVersion1(), TRIM_AT_LENGTH)); item.set(LIST_COLUMN_VERSION_2, CmsStringUtil.trimToSize(comparison.getVersion2(), TRIM_AT_LENGTH)); if (CmsResourceComparison.TYPE_ADDED.equals(comparison.getStatus())) {
CmsListItem item = getList().newItem(comparison.getName()); item.set(LIST_COLUMN_PROPERTY_NAME, key(comparison.getName())); item.set(LIST_COLUMN_VERSION_1, CmsStringUtil.trimToSize(comparison.getVersion1(), TRIM_AT_LENGTH)); item.set(LIST_COLUMN_VERSION_2, CmsStringUtil.trimToSize(comparison.getVersion2(), TRIM_AT_LENGTH)); if (CmsResourceComparison.TYPE_ADDED.equals(comparison.getStatus())) {