/** * @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 second version.<p> * * @return the second version's value */ @Column(header = "V2 (%(v2))", order = 30) public String getV2() { return m_comp.getVersion2(); }
/** * 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()}; }
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())) { item.set(LIST_COLUMN_TYPE, key(Messages.GUI_COMPARE_ADDED_0));
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())) { item.set(LIST_COLUMN_TYPE, key(Messages.GUI_COMPARE_ADDED_0));
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())) { item.set(LIST_COLUMN_TYPE, key(Messages.GUI_COMPARE_ADDED_0));
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())) { item.set(LIST_COLUMN_TYPE, key(Messages.GUI_COMPARE_ADDED_0));