com.wewebu.ow.server.ecmimpl.opencmis.util
Class OwPropertyDefinitionHelper

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.opencmis.util.OwPropertyDefinitionHelper

public class OwPropertyDefinitionHelper
extends Object

Helper to compare two PropertyDefinition instances.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
OwPropertyDefinitionHelper()
           
 
Method Summary
static boolean isDifferent(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> a, org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> b)
          Compare base attributes of the property definition, if it is not returning on main checks the isInheritanceDifferent(PropertyDefinition, PropertyDefinition) is invoked to compare deeper.
static boolean isInheritanceDifferent(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> a, org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> b)
          Assuming that the property definitions are linked somehow, or represent an inheritance dependency, this method will check the other attributes and tell if there are differences.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwPropertyDefinitionHelper

public OwPropertyDefinitionHelper()
Method Detail

isDifferent

public static boolean isDifferent(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> a,
                                  org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> b)
Compare base attributes of the property definition, if it is not returning on main checks the isInheritanceDifferent(PropertyDefinition, PropertyDefinition) is invoked to compare deeper. Compared are the attributes:
a.Id == b.Id;
a.type == b.type;
a.cardinality == b.cardinality;
a.queryName == b.queryName;

Parameters:
a - PropertyDefinition
b - PropertyDefinition
Returns:
true if different

isInheritanceDifferent

public static boolean isInheritanceDifferent(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> a,
                                             org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> b)
Assuming that the property definitions are linked somehow, or represent an inheritance dependency, this method will check the other attributes and tell if there are differences.

Parameters:
a - PropertyDefinition
b - PropertyDefinition
Returns:
true if definition's are different, false else


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.