chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r934897 [5/5] - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src: main/java/org/apache/chemistry/opencmis/commons/impl/ main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ t...
Date Fri, 16 Apr 2010 14:14:11 GMT
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java?rev=934897&r1=934896&r2=934897&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryCapabilitiesImpl.java Fri Apr 16 14:14:09 2010
@@ -30,233 +30,243 @@ import org.apache.chemistry.opencmis.com
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
  * 
  */
-public class RepositoryCapabilitiesImpl extends AbstractExtensionData implements
-    RepositoryCapabilities {
+public class RepositoryCapabilitiesImpl extends AbstractExtensionData implements RepositoryCapabilities {
 
-  private static final long serialVersionUID = 1L;
+	private static final long serialVersionUID = 1L;
 
-  private Boolean fAllVersionsSearchable;
-  private CapabilityAcl fCapabilityAcl;
-  private CapabilityChanges fCapabilityChanges;
-  private CapabilityContentStreamUpdates fCapabilityContentStreamUpdates;
-  private CapabilityJoin fCapabilityJoin;
-  private CapabilityQuery fCapabilityQuery;
-  private CapabilityRenditions fCapabilityRendition;
-  private Boolean fIsPwcSearchable;
-  private Boolean fIsPwcUpdatable;
-  private Boolean fSupportsGetDescendants;
-  private Boolean fSupportsGetFolderTree;
-  private Boolean fSupportsMultifiling;
-  private Boolean fSupportsUnfiling;
-  private Boolean fSupportsVersionSpecificFiling;
-
-  /**
-   * Constructor.
-   */
-  public RepositoryCapabilitiesImpl() {
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#allVersionsSearchable()
-   */
-  public Boolean isAllVersionsSearchableSupported() {
-    return fAllVersionsSearchable;
-  }
-
-  public void setAllVersionsSearchable(Boolean allVersionsSearchable) {
-    fAllVersionsSearchable = allVersionsSearchable;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#getCapabilityACL()
-   */
-  public CapabilityAcl getAclCapability() {
-    return fCapabilityAcl;
-  }
-
-  public void setCapabilityAcl(CapabilityAcl capabilityAcl) {
-    fCapabilityAcl = capabilityAcl;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#getCapabilityChanges()
-   */
-  public CapabilityChanges getChangesCapability() {
-    return fCapabilityChanges;
-  }
-
-  public void setCapabilityChanges(CapabilityChanges capabilityChanges) {
-    fCapabilityChanges = capabilityChanges;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see
-   * org.apache.opencmis.client.provider.RepositoryCapabilitiesData#getCapabilityContentStreamUpdatability
-   * ()
-   */
-  public CapabilityContentStreamUpdates getContentStreamUpdatesCapability() {
-    return fCapabilityContentStreamUpdates;
-  }
-
-  public void setCapabilityContentStreamUpdates(
-      CapabilityContentStreamUpdates capabilityContentStreamUpdates) {
-    fCapabilityContentStreamUpdates = capabilityContentStreamUpdates;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#getCapabilityJoin()
-   */
-  public CapabilityJoin getJoinCapability() {
-    return fCapabilityJoin;
-  }
-
-  public void setCapabilityJoin(CapabilityJoin capabilityJoin) {
-    fCapabilityJoin = capabilityJoin;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#getCapabilityQuery()
-   */
-  public CapabilityQuery getQueryCapability() {
-    return fCapabilityQuery;
-  }
-
-  public void setCapabilityQuery(CapabilityQuery capabilityQuery) {
-    fCapabilityQuery = capabilityQuery;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#getCapabilityRenditions()
-   */
-  public CapabilityRenditions getRenditionsCapability() {
-    return fCapabilityRendition;
-  }
-
-  public void setCapabilityRendition(CapabilityRenditions capabilityRendition) {
-    fCapabilityRendition = capabilityRendition;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#isPwcSearchable()
-   */
-  public Boolean isPwcSearchableSupported() {
-    return fIsPwcSearchable;
-  }
-
-  public void setIsPwcSearchable(Boolean isPwcSearchable) {
-    fIsPwcSearchable = isPwcSearchable;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#isPwcUpdatable()
-   */
-  public Boolean isPwcUpdatableSupported() {
-    return fIsPwcUpdatable;
-  }
-
-  public void setIsPwcUpdatable(Boolean isPwcUpdatable) {
-    fIsPwcUpdatable = isPwcUpdatable;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#supportsGetDescendants()
-   */
-  public Boolean isGetDescendantsSupported() {
-    return fSupportsGetDescendants;
-  }
-
-  public void setSupportsGetDescendants(Boolean supportsGetDescendants) {
-    fSupportsGetDescendants = supportsGetDescendants;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#supportsGetFolderTree()
-   */
-  public Boolean isGetFolderTreeSupported() {
-    return fSupportsGetFolderTree;
-  }
-
-  public void setSupportsGetFolderTree(Boolean supportsGetFolderTree) {
-    fSupportsGetFolderTree = supportsGetFolderTree;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#supportsMultifiling()
-   */
-  public Boolean isMultifilingSupported() {
-    return fSupportsMultifiling;
-  }
-
-  public void setSupportsMultifiling(Boolean supportsMultifiling) {
-    fSupportsMultifiling = supportsMultifiling;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#supportsUnfiling()
-   */
-  public Boolean isUnfilingSupported() {
-    return fSupportsUnfiling;
-  }
-
-  public void setSupportsUnfiling(Boolean supportsUnfiling) {
-    fSupportsUnfiling = supportsUnfiling;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.RepositoryCapabilitiesData#supportsVersionSpecificFiling()
-   */
-  public Boolean isVersionSpecificFilingSupported() {
-    return fSupportsVersionSpecificFiling;
-  }
-
-  public void setSupportsVersionSpecificFiling(Boolean supportsVersionSpecificFiling) {
-    fSupportsVersionSpecificFiling = supportsVersionSpecificFiling;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see java.lang.Object#toString()
-   */
-  @Override
-  public String toString() {
-    return "Repository Capabilities [all versions searchable=" + fAllVersionsSearchable
-        + ", capability ACL=" + fCapabilityAcl + ", capability changes=" + fCapabilityChanges
-        + ", capability content stream updates=" + fCapabilityContentStreamUpdates
-        + ", capability join=" + fCapabilityJoin + ", capability query=" + fCapabilityQuery
-        + ", capability rendition=" + fCapabilityRendition + ", is PWC searchable="
-        + fIsPwcSearchable + ", is PWC updatable=" + fIsPwcUpdatable + ", supports GetDescendants="
-        + fSupportsGetDescendants + ", supports GetFolderTree=" + fSupportsGetFolderTree
-        + ", supports multifiling=" + fSupportsMultifiling + ", supports unfiling="
-        + fSupportsUnfiling + ", supports version specific filing="
-        + fSupportsVersionSpecificFiling + "]" + super.toString();
-  }
+	private Boolean fAllVersionsSearchable;
+	private CapabilityAcl fCapabilityAcl;
+	private CapabilityChanges fCapabilityChanges;
+	private CapabilityContentStreamUpdates fCapabilityContentStreamUpdates;
+	private CapabilityJoin fCapabilityJoin;
+	private CapabilityQuery fCapabilityQuery;
+	private CapabilityRenditions fCapabilityRendition;
+	private Boolean fIsPwcSearchable;
+	private Boolean fIsPwcUpdatable;
+	private Boolean fSupportsGetDescendants;
+	private Boolean fSupportsGetFolderTree;
+	private Boolean fSupportsMultifiling;
+	private Boolean fSupportsUnfiling;
+	private Boolean fSupportsVersionSpecificFiling;
+
+	/**
+	 * Constructor.
+	 */
+	public RepositoryCapabilitiesImpl() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * allVersionsSearchable()
+	 */
+	public Boolean isAllVersionsSearchableSupported() {
+		return fAllVersionsSearchable;
+	}
+
+	public void setAllVersionsSearchable(Boolean allVersionsSearchable) {
+		fAllVersionsSearchable = allVersionsSearchable;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * getCapabilityACL()
+	 */
+	public CapabilityAcl getAclCapability() {
+		return fCapabilityAcl;
+	}
+
+	public void setCapabilityAcl(CapabilityAcl capabilityAcl) {
+		fCapabilityAcl = capabilityAcl;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * getCapabilityChanges()
+	 */
+	public CapabilityChanges getChangesCapability() {
+		return fCapabilityChanges;
+	}
+
+	public void setCapabilityChanges(CapabilityChanges capabilityChanges) {
+		fCapabilityChanges = capabilityChanges;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * getCapabilityContentStreamUpdatability ()
+	 */
+	public CapabilityContentStreamUpdates getContentStreamUpdatesCapability() {
+		return fCapabilityContentStreamUpdates;
+	}
+
+	public void setCapabilityContentStreamUpdates(CapabilityContentStreamUpdates capabilityContentStreamUpdates) {
+		fCapabilityContentStreamUpdates = capabilityContentStreamUpdates;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * getCapabilityJoin()
+	 */
+	public CapabilityJoin getJoinCapability() {
+		return fCapabilityJoin;
+	}
+
+	public void setCapabilityJoin(CapabilityJoin capabilityJoin) {
+		fCapabilityJoin = capabilityJoin;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * getCapabilityQuery()
+	 */
+	public CapabilityQuery getQueryCapability() {
+		return fCapabilityQuery;
+	}
+
+	public void setCapabilityQuery(CapabilityQuery capabilityQuery) {
+		fCapabilityQuery = capabilityQuery;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * getCapabilityRenditions()
+	 */
+	public CapabilityRenditions getRenditionsCapability() {
+		return fCapabilityRendition;
+	}
+
+	public void setCapabilityRendition(CapabilityRenditions capabilityRendition) {
+		fCapabilityRendition = capabilityRendition;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * isPwcSearchable()
+	 */
+	public Boolean isPwcSearchableSupported() {
+		return fIsPwcSearchable;
+	}
+
+	public void setIsPwcSearchable(Boolean isPwcSearchable) {
+		fIsPwcSearchable = isPwcSearchable;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.RepositoryCapabilitiesData#isPwcUpdatable
+	 * ()
+	 */
+	public Boolean isPwcUpdatableSupported() {
+		return fIsPwcUpdatable;
+	}
+
+	public void setIsPwcUpdatable(Boolean isPwcUpdatable) {
+		fIsPwcUpdatable = isPwcUpdatable;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * supportsGetDescendants()
+	 */
+	public Boolean isGetDescendantsSupported() {
+		return fSupportsGetDescendants;
+	}
+
+	public void setSupportsGetDescendants(Boolean supportsGetDescendants) {
+		fSupportsGetDescendants = supportsGetDescendants;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * supportsGetFolderTree()
+	 */
+	public Boolean isGetFolderTreeSupported() {
+		return fSupportsGetFolderTree;
+	}
+
+	public void setSupportsGetFolderTree(Boolean supportsGetFolderTree) {
+		fSupportsGetFolderTree = supportsGetFolderTree;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * supportsMultifiling()
+	 */
+	public Boolean isMultifilingSupported() {
+		return fSupportsMultifiling;
+	}
+
+	public void setSupportsMultifiling(Boolean supportsMultifiling) {
+		fSupportsMultifiling = supportsMultifiling;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * supportsUnfiling()
+	 */
+	public Boolean isUnfilingSupported() {
+		return fSupportsUnfiling;
+	}
+
+	public void setSupportsUnfiling(Boolean supportsUnfiling) {
+		fSupportsUnfiling = supportsUnfiling;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.apache.opencmis.client.provider.RepositoryCapabilitiesData#
+	 * supportsVersionSpecificFiling()
+	 */
+	public Boolean isVersionSpecificFilingSupported() {
+		return fSupportsVersionSpecificFiling;
+	}
+
+	public void setSupportsVersionSpecificFiling(Boolean supportsVersionSpecificFiling) {
+		fSupportsVersionSpecificFiling = supportsVersionSpecificFiling;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "Repository Capabilities [all versions searchable=" + fAllVersionsSearchable + ", capability ACL="
+				+ fCapabilityAcl + ", capability changes=" + fCapabilityChanges
+				+ ", capability content stream updates=" + fCapabilityContentStreamUpdates + ", capability join="
+				+ fCapabilityJoin + ", capability query=" + fCapabilityQuery + ", capability rendition="
+				+ fCapabilityRendition + ", is PWC searchable=" + fIsPwcSearchable + ", is PWC updatable="
+				+ fIsPwcUpdatable + ", supports GetDescendants=" + fSupportsGetDescendants
+				+ ", supports GetFolderTree=" + fSupportsGetFolderTree + ", supports multifiling="
+				+ fSupportsMultifiling + ", supports unfiling=" + fSupportsUnfiling
+				+ ", supports version specific filing=" + fSupportsVersionSpecificFiling + "]" + super.toString();
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java?rev=934897&r1=934896&r2=934897&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/RepositoryInfoImpl.java Fri Apr 16 14:14:09 2010
@@ -27,194 +27,193 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * Repository info data implementation.
- *
+ * 
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
- *
+ * 
  */
 public class RepositoryInfoImpl extends AbstractExtensionData implements RepositoryInfo {
 
-  private static final long serialVersionUID = 1L;
+	private static final long serialVersionUID = 1L;
 
-  private String fId;
-  private String fName;
-  private String fDescription;
-  private String fVersionSupported;
-  private RepositoryCapabilities fCapabilities;
-  private String fRootFolderId;
-  private AclCapabilities fAclCapabilities;
-  private String fPrincipalAnonymous;
-  private String fPrincipalAnyone;
-  private String fThinClientUri;
-  private Boolean fChangesIncomplete;
-  private List<BaseTypeId> fChangesOnType;
-  private String fLatestChangeLogToken;
-  private String fVendorName;
-  private String fProductName;
-  private String fProductVersion;
-
-  /**
-   * Constructor.
-   */
-  public RepositoryInfoImpl() {
-  }
-
-  public RepositoryInfoImpl(RepositoryInfo data) {
-    fId = data.getId();
-    fName = data.getName();
-    fDescription = data.getDescription();
-    fVersionSupported = data.getCmisVersionSupported();
-    fCapabilities = data.getCapabilities();
-    fRootFolderId = data.getRootFolderId();
-    fAclCapabilities = data.getAclCapabilities();
-    fPrincipalAnonymous = data.getPrincipalIdAnonymous();
-    fPrincipalAnyone = data.getPrincipalIdAnyone();
-    fThinClientUri = data.getThinClientUri();
-    fChangesIncomplete = data.getChangesIncomplete();
-    fChangesOnType = data.getChangesOnType();
-    fLatestChangeLogToken = data.getLatestChangeLogToken();
-    fVendorName = data.getVendorName();
-    fProductName = data.getProductName();
-    fProductVersion = data.getProductVersion();
-}
-
-public String getId() {
-    return fId;
-  }
-
-  public void setRepositoryId(String id) {
-    fId = id;
-  }
-
-  public String getName() {
-    return fName;
-  }
-
-  public void setRepositoryName(String name) {
-    fName = name;
-  }
-
-  public String getDescription() {
-    return fDescription;
-  }
-
-  public void setRepositoryDescription(String description) {
-    fDescription = description;
-  }
-
-  public String getCmisVersionSupported() {
-    return fVersionSupported;
-  }
-
-  public void setCmisVersionSupported(String versionSupported) {
-    fVersionSupported = versionSupported;
-  }
-
-  public RepositoryCapabilities getCapabilities() {
-    return fCapabilities;
-  }
-
-  public void setRepositoryCapabilities(RepositoryCapabilities capabilities) {
-    fCapabilities = capabilities;
-  }
-
-  public String getRootFolderId() {
-    return fRootFolderId;
-  }
-
-  public void setRootFolder(String rootFolderId) {
-    fRootFolderId = rootFolderId;
-  }
-
-  public AclCapabilities getAclCapabilities() {
-    return fAclCapabilities;
-  }
-
-  public void setAclCapabilities(AclCapabilities aclCapabilities) {
-    fAclCapabilities = aclCapabilities;
-  }
-
-  public String getPrincipalIdAnonymous() {
-    return fPrincipalAnonymous;
-  }
-
-  public void setPrincipalAnonymous(String principalAnonymous) {
-    fPrincipalAnonymous = principalAnonymous;
-  }
-
-  public String getPrincipalIdAnyone() {
-    return fPrincipalAnyone;
-  }
-
-  public void setPrincipalAnyone(String principalAnyone) {
-    fPrincipalAnyone = principalAnyone;
-  }
-
-  public String getThinClientUri() {
-    return fThinClientUri;
-  }
-
-  public void setThinClientUri(String thinClientUri) {
-    fThinClientUri = thinClientUri;
-  }
-
-  public Boolean getChangesIncomplete() {
-    return fChangesIncomplete;
-  }
-
-  public void setChangesIncomplete(Boolean changesIncomplete) {
-    fChangesIncomplete = changesIncomplete;
-  }
-
-  public List<BaseTypeId> getChangesOnType() {
-    return fChangesOnType;
-  }
-
-  public void setChangesOnType(List<BaseTypeId> changesOnType) {
-    fChangesOnType = changesOnType;
-  }
-
-  public String getLatestChangeLogToken() {
-    return fLatestChangeLogToken;
-  }
-
-  public void setLatestChangeLogToken(String latestChangeLogToken) {
-    fLatestChangeLogToken = latestChangeLogToken;
-  }
-
-  public String getVendorName() {
-    return fVendorName;
-  }
-
-  public void setVendorName(String vendorName) {
-    fVendorName = vendorName;
-  }
-
-  public String getProductName() {
-    return fProductName;
-  }
-
-  public void setProductName(String productName) {
-    fProductName = productName;
-  }
-
-  public String getProductVersion() {
-    return fProductVersion;
-  }
-
-  public void setProductVersion(String productVersion) {
-    fProductVersion = productVersion;
-  }
-
-  @Override
-  public String toString() {
-    return "Repository Info [id=" + fId + ", name=" + fName + ", description=" + fDescription
-        + ", capabilities=" + fCapabilities + ", ACL capabilities=" + fAclCapabilities
-        + ", changes incomplete=" + fChangesIncomplete + ", changes on type=" + fChangesOnType
-        + ", latest change log token=" + fLatestChangeLogToken + ", principal anonymous="
-        + fPrincipalAnonymous + ", principal anyone=" + fPrincipalAnyone + ", vendor name="
-        + fVendorName + ", product name=" + fProductName + ", product version=" + fProductVersion
-        + ", root folder id=" + fRootFolderId + ", thin client URI=" + fThinClientUri
-        + ", version supported=" + fVersionSupported + "]" + super.toString();
-  }
+	private String fId;
+	private String fName;
+	private String fDescription;
+	private String fVersionSupported;
+	private RepositoryCapabilities fCapabilities;
+	private String fRootFolderId;
+	private AclCapabilities fAclCapabilities;
+	private String fPrincipalAnonymous;
+	private String fPrincipalAnyone;
+	private String fThinClientUri;
+	private Boolean fChangesIncomplete;
+	private List<BaseTypeId> fChangesOnType;
+	private String fLatestChangeLogToken;
+	private String fVendorName;
+	private String fProductName;
+	private String fProductVersion;
+
+	/**
+	 * Constructor.
+	 */
+	public RepositoryInfoImpl() {
+	}
+
+	public RepositoryInfoImpl(RepositoryInfo data) {
+		fId = data.getId();
+		fName = data.getName();
+		fDescription = data.getDescription();
+		fVersionSupported = data.getCmisVersionSupported();
+		fCapabilities = data.getCapabilities();
+		fRootFolderId = data.getRootFolderId();
+		fAclCapabilities = data.getAclCapabilities();
+		fPrincipalAnonymous = data.getPrincipalIdAnonymous();
+		fPrincipalAnyone = data.getPrincipalIdAnyone();
+		fThinClientUri = data.getThinClientUri();
+		fChangesIncomplete = data.getChangesIncomplete();
+		fChangesOnType = data.getChangesOnType();
+		fLatestChangeLogToken = data.getLatestChangeLogToken();
+		fVendorName = data.getVendorName();
+		fProductName = data.getProductName();
+		fProductVersion = data.getProductVersion();
+	}
+
+	public String getId() {
+		return fId;
+	}
+
+	public void setRepositoryId(String id) {
+		fId = id;
+	}
+
+	public String getName() {
+		return fName;
+	}
+
+	public void setRepositoryName(String name) {
+		fName = name;
+	}
+
+	public String getDescription() {
+		return fDescription;
+	}
+
+	public void setRepositoryDescription(String description) {
+		fDescription = description;
+	}
+
+	public String getCmisVersionSupported() {
+		return fVersionSupported;
+	}
+
+	public void setCmisVersionSupported(String versionSupported) {
+		fVersionSupported = versionSupported;
+	}
+
+	public RepositoryCapabilities getCapabilities() {
+		return fCapabilities;
+	}
+
+	public void setRepositoryCapabilities(RepositoryCapabilities capabilities) {
+		fCapabilities = capabilities;
+	}
+
+	public String getRootFolderId() {
+		return fRootFolderId;
+	}
+
+	public void setRootFolder(String rootFolderId) {
+		fRootFolderId = rootFolderId;
+	}
+
+	public AclCapabilities getAclCapabilities() {
+		return fAclCapabilities;
+	}
+
+	public void setAclCapabilities(AclCapabilities aclCapabilities) {
+		fAclCapabilities = aclCapabilities;
+	}
+
+	public String getPrincipalIdAnonymous() {
+		return fPrincipalAnonymous;
+	}
+
+	public void setPrincipalAnonymous(String principalAnonymous) {
+		fPrincipalAnonymous = principalAnonymous;
+	}
+
+	public String getPrincipalIdAnyone() {
+		return fPrincipalAnyone;
+	}
+
+	public void setPrincipalAnyone(String principalAnyone) {
+		fPrincipalAnyone = principalAnyone;
+	}
+
+	public String getThinClientUri() {
+		return fThinClientUri;
+	}
+
+	public void setThinClientUri(String thinClientUri) {
+		fThinClientUri = thinClientUri;
+	}
+
+	public Boolean getChangesIncomplete() {
+		return fChangesIncomplete;
+	}
+
+	public void setChangesIncomplete(Boolean changesIncomplete) {
+		fChangesIncomplete = changesIncomplete;
+	}
+
+	public List<BaseTypeId> getChangesOnType() {
+		return fChangesOnType;
+	}
+
+	public void setChangesOnType(List<BaseTypeId> changesOnType) {
+		fChangesOnType = changesOnType;
+	}
+
+	public String getLatestChangeLogToken() {
+		return fLatestChangeLogToken;
+	}
+
+	public void setLatestChangeLogToken(String latestChangeLogToken) {
+		fLatestChangeLogToken = latestChangeLogToken;
+	}
+
+	public String getVendorName() {
+		return fVendorName;
+	}
+
+	public void setVendorName(String vendorName) {
+		fVendorName = vendorName;
+	}
+
+	public String getProductName() {
+		return fProductName;
+	}
+
+	public void setProductName(String productName) {
+		fProductName = productName;
+	}
+
+	public String getProductVersion() {
+		return fProductVersion;
+	}
+
+	public void setProductVersion(String productVersion) {
+		fProductVersion = productVersion;
+	}
+
+	@Override
+	public String toString() {
+		return "Repository Info [id=" + fId + ", name=" + fName + ", description=" + fDescription + ", capabilities="
+				+ fCapabilities + ", ACL capabilities=" + fAclCapabilities + ", changes incomplete="
+				+ fChangesIncomplete + ", changes on type=" + fChangesOnType + ", latest change log token="
+				+ fLatestChangeLogToken + ", principal anonymous=" + fPrincipalAnonymous + ", principal anyone="
+				+ fPrincipalAnyone + ", vendor name=" + fVendorName + ", product name=" + fProductName
+				+ ", product version=" + fProductVersion + ", root folder id=" + fRootFolderId + ", thin client URI="
+				+ fThinClientUri + ", version supported=" + fVersionSupported + "]" + super.toString();
+	}
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionContainerImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionContainerImpl.java?rev=934897&r1=934896&r2=934897&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionContainerImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionContainerImpl.java Fri Apr 16 14:14:09 2010
@@ -28,54 +28,55 @@ import org.apache.chemistry.opencmis.com
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
  * 
  */
-public class TypeDefinitionContainerImpl extends AbstractExtensionData implements
-    TypeDefinitionContainer {
+public class TypeDefinitionContainerImpl extends AbstractExtensionData implements TypeDefinitionContainer {
 
-  private TypeDefinition fType;
-  private List<TypeDefinitionContainer> fChildren;
+	private TypeDefinition fType;
+	private List<TypeDefinitionContainer> fChildren;
 
-  public TypeDefinitionContainerImpl() {
-  }
+	public TypeDefinitionContainerImpl() {
+	}
 
-  public TypeDefinitionContainerImpl(TypeDefinition typeDef) {
-    setTypeDefinition(typeDef);
-    fChildren = new ArrayList<TypeDefinitionContainer>();
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.TypeDefinitionContainer#getTypeDefinition()
-   */
-  public TypeDefinition getTypeDefinition() {
-    return fType;
-  }
-
-  public void setTypeDefinition(TypeDefinition type) {
-    fType = type;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.TypeDefinitionContainer#getChildren()
-   */
-  public List<TypeDefinitionContainer> getChildren() {
-    return fChildren;
-  }
-
-  public void setChildren(List<TypeDefinitionContainer> children) {
-    fChildren = children;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see java.lang.Object#toString()
-   */
-  @Override
-  public String toString() {
-    return "Type Definition Container [type=" + fType + " ,children=" + fChildren + "]"
-        + super.toString();
-  }
+	public TypeDefinitionContainerImpl(TypeDefinition typeDef) {
+		setTypeDefinition(typeDef);
+		fChildren = new ArrayList<TypeDefinitionContainer>();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.TypeDefinitionContainer#getTypeDefinition
+	 * ()
+	 */
+	public TypeDefinition getTypeDefinition() {
+		return fType;
+	}
+
+	public void setTypeDefinition(TypeDefinition type) {
+		fType = type;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.apache.opencmis.client.provider.TypeDefinitionContainer#getChildren()
+	 */
+	public List<TypeDefinitionContainer> getChildren() {
+		return fChildren;
+	}
+
+	public void setChildren(List<TypeDefinitionContainer> children) {
+		fChildren = children;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "Type Definition Container [type=" + fType + " ,children=" + fChildren + "]" + super.toString();
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionListImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionListImpl.java?rev=934897&r1=934896&r2=934897&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionListImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/TypeDefinitionListImpl.java Fri Apr 16 14:14:09 2010
@@ -30,57 +30,57 @@ import org.apache.chemistry.opencmis.com
  */
 public class TypeDefinitionListImpl extends AbstractExtensionData implements TypeDefinitionList {
 
-  private List<TypeDefinition> fList;
-  private Boolean fHasMoreItems = Boolean.FALSE;
-  private BigInteger fNumItems;
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.TypeDefintionList#getList()
-   */
-  public List<TypeDefinition> getList() {
-    return fList;
-  }
-
-  public void setList(List<TypeDefinition> list) {
-    fList = list;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.TypeDefintionList#hasMoreItems()
-   */
-  public Boolean hasMoreItems() {
-    return fHasMoreItems;
-  }
-
-  public void setHasMoreItems(Boolean hasMoreItems) {
-    fHasMoreItems = hasMoreItems;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see org.apache.opencmis.client.provider.TypeDefintionList#getNumItems()
-   */
-  public BigInteger getNumItems() {
-    return fNumItems;
-  }
-
-  public void setNumItems(BigInteger numItems) {
-    fNumItems = numItems;
-  }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see java.lang.Object#toString()
-   */
-  @Override
-  public String toString() {
-    return "Type Definition List [list=" + fList + ", has more items=" + fHasMoreItems
-        + ", num items=" + fNumItems + "]" + super.toString();
-  }
+	private List<TypeDefinition> fList;
+	private Boolean fHasMoreItems = Boolean.FALSE;
+	private BigInteger fNumItems;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.opencmis.client.provider.TypeDefintionList#getList()
+	 */
+	public List<TypeDefinition> getList() {
+		return fList;
+	}
+
+	public void setList(List<TypeDefinition> list) {
+		fList = list;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.opencmis.client.provider.TypeDefintionList#hasMoreItems()
+	 */
+	public Boolean hasMoreItems() {
+		return fHasMoreItems;
+	}
+
+	public void setHasMoreItems(Boolean hasMoreItems) {
+		fHasMoreItems = hasMoreItems;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.opencmis.client.provider.TypeDefintionList#getNumItems()
+	 */
+	public BigInteger getNumItems() {
+		return fNumItems;
+	}
+
+	public void setNumItems(BigInteger numItems) {
+		fNumItems = numItems;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "Type Definition List [list=" + fList + ", has more items=" + fHasMoreItems + ", num items=" + fNumItems
+				+ "]" + super.toString();
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/ConverterTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/ConverterTest.java?rev=934897&r1=934896&r2=934897&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/ConverterTest.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/ConverterTest.java Fri Apr 16 14:14:09 2010
@@ -56,197 +56,190 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * Tests converter methods.
- *
+ * 
  * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
- *
+ * 
  */
 public class ConverterTest extends TestCase {
 
-  public void testRepositoryInfo() throws Exception {
-    // dry run
-    RepositoryInfoImpl obj1 = new RepositoryInfoImpl();
-    RepositoryInfo obj2 = Converter.convert(Converter.convert(obj1));
-
-    assertDataObjectsEquals("RepositoryInfo", obj1, obj2);
-
-    // values
-    obj1 = new RepositoryInfoImpl();
-    obj1.setChangesIncomplete(Boolean.TRUE);
-    obj1.setChangesOnType(Collections.singletonList(BaseTypeId.CMIS_DOCUMENT));
-    obj1.setCmisVersionSupported("1.0");
-    obj1.setLatestChangeLogToken("changeLogToken");
-    obj1.setPrincipalAnonymous("principalAnonymous");
-    obj1.setPrincipalAnyone("principalAnyone");
-    obj1.setProductName("productName");
-    obj1.setProductVersion("productVersion");
-    obj1.setRepositoryDescription("description");
-    obj1.setRepositoryId("id");
-    obj1.setRepositoryName("name");
-    obj1.setRootFolder("rootFolderId");
-    obj1.setThinClientUri("thinClientUri");
-    obj1.setVendorName("vendorName");
-
-    RepositoryCapabilitiesImpl cap1 = new RepositoryCapabilitiesImpl();
-    cap1.setAllVersionsSearchable(Boolean.TRUE);
-    cap1.setCapabilityAcl(CapabilityAcl.DISCOVER);
-    cap1.setCapabilityChanges(CapabilityChanges.ALL);
-    cap1.setCapabilityContentStreamUpdates(CapabilityContentStreamUpdates.ANYTIME);
-    cap1.setCapabilityJoin(CapabilityJoin.INNERANDOUTER);
-    cap1.setCapabilityQuery(CapabilityQuery.BOTHCOMBINED);
-    cap1.setCapabilityRendition(CapabilityRenditions.READ);
-    cap1.setIsPwcSearchable(Boolean.TRUE);
-    cap1.setIsPwcUpdatable(Boolean.TRUE);
-    cap1.setSupportsGetDescendants(Boolean.TRUE);
-    cap1.setSupportsGetFolderTree(Boolean.TRUE);
-    cap1.setSupportsMultifiling(Boolean.TRUE);
-    cap1.setSupportsUnfiling(Boolean.TRUE);
-    cap1.setSupportsVersionSpecificFiling(Boolean.TRUE);
-    obj1.setRepositoryCapabilities(cap1);
-
-    AclCapabilitiesDataImpl acl1 = new AclCapabilitiesDataImpl();
-    acl1.setAclPropagation(AclPropagation.PROPAGATE);
-    List<PermissionDefinition> pddList = new ArrayList<PermissionDefinition>();
-    PermissionDefinitionDataImpl pdd1 = new PermissionDefinitionDataImpl();
-    pdd1.setPermission("test:perm1");
-    pdd1.setDescription("Permission1");
-    pddList.add(pdd1);
-    PermissionDefinitionDataImpl pdd2 = new PermissionDefinitionDataImpl();
-    pdd2.setPermission("test:perm2");
-    pdd2.setDescription("Permission2");
-    pddList.add(pdd2);
-    acl1.setPermissionDefinitionData(pddList);
-    Map<String, PermissionMapping> pmd = new LinkedHashMap<String, PermissionMapping>();
-    PermissionMappingDataImpl pmd1 = new PermissionMappingDataImpl();
-    pmd1.setKey(PermissionMapping.CAN_CREATE_DOCUMENT_FOLDER);
-    pmd1.setPermissions(Arrays.asList(new String[] { "p1", "p2" }));
-    pmd.put(pmd1.getKey(), pmd1);
-    PermissionMappingDataImpl pmd2 = new PermissionMappingDataImpl();
-    pmd2.setKey(PermissionMapping.CAN_DELETE_OBJECT);
-    pmd2.setPermissions(Arrays.asList(new String[] { "p3", "p4" }));
-    pmd.put(pmd2.getKey(), pmd2);
-    acl1.setPermissionMappingData(pmd);
-    obj1.setAclCapabilities(acl1);
-
-    obj2 = Converter.convert(Converter.convert(obj1));
-
-    assertDataObjectsEquals("RepositoryInfo", obj1, obj2);
-  }
-
-  public void testTypeDefinition() throws Exception {
-    // dry run
-    DocumentTypeDefinitionImpl obj1 = new DocumentTypeDefinitionImpl();
-    TypeDefinition obj2 = Converter.convert(Converter.convert(obj1));
-
-    assertDataObjectsEquals("TypeDefinition", obj1, obj2);
-
-    // simple values
-    obj1 = new DocumentTypeDefinitionImpl();
-    obj1.setBaseTypeId(BaseTypeId.CMIS_DOCUMENT);
-    obj1.setContentStreamAllowed(ContentStreamAllowed.ALLOWED);
-    obj1.setDescription("description");
-    obj1.setDisplayName("displayName");
-    obj1.setId("id");
-    obj1.setIsControllableAcl(Boolean.TRUE);
-    obj1.setIsControllablePolicy(Boolean.TRUE);
-    obj1.setIsCreatable(Boolean.TRUE);
-    obj1.setIsFileable(Boolean.TRUE);
-    obj1.setIsIncludedInSupertypeQuery(Boolean.TRUE);
-    obj1.setIsQueryable(Boolean.TRUE);
-    obj1.setIsVersionable(Boolean.TRUE);
-    obj1.setLocalName("localName");
-    obj1.setLocalNamespace("localNamespace");
-    obj1.setParentTypeId("parentId");
-    obj1.setQueryName("queryName");
-
-    obj2 = Converter.convert(Converter.convert(obj1));
-
-    assertDataObjectsEquals("TypeDefinition", obj1, obj2);
-  }
-
-  public void testObject() throws Exception {
-    // dry run
-    ObjectDataImpl obj1 = new ObjectDataImpl();
-    ObjectData obj2 = Converter.convert(Converter.convert(obj1));
-
-    assertDataObjectsEquals("Object", obj1, obj2);
-  }
-
-  /**
-   * Asserts OpenCMIS data objects.
-   */
-  protected void assertDataObjectsEquals(String name, Object expected, Object actual)
-      throws Exception {
-    System.out.println(name);
-
-    if ((expected == null) && (actual == null)) {
-      return;
-    }
-
-    if ((expected == null) && (actual instanceof Collection<?>)) {
-      assertTrue(((Collection<?>) actual).isEmpty());
-      return;
-    }
-    else if ((expected instanceof Collection<?>) && (actual == null)) {
-      assertTrue(((Collection<?>) expected).isEmpty());
-      return;
-    }
-    else if ((expected == null) || (actual == null)) {
-      fail("Data object is null! name: " + name + " / expected: " + expected + " / actual: "
-          + actual);
-    }
-
-    // handle simple types
-    if ((expected instanceof String) || (expected instanceof Boolean)
-        || (expected instanceof BigInteger) || (expected instanceof BigDecimal)
-        || (expected instanceof Enum<?>)) {
-      assertEquals(expected, actual);
-
-      return;
-    }
-    else if (expected instanceof List<?>) {
-      List<?> expectedList = (List<?>) expected;
-      List<?> actualList = (List<?>) actual;
-
-      assertEquals(expectedList.size(), actualList.size());
-
-      for (int i = 0; i < expectedList.size(); i++) {
-        assertDataObjectsEquals(name + "[" + i + "]", expectedList.get(i), actualList.get(i));
-      }
-
-      return;
-    }
-    else if (expected instanceof Map<?, ?>) {
-      Map<?, ?> expectedMap = (Map<?, ?>) expected;
-      Map<?, ?> actualMap = (Map<?, ?>) actual;
-
-      assertEquals(expectedMap.size(), actualMap.size());
-
-      for (Map.Entry<?, ?> entry : expectedMap.entrySet()) {
-        assertTrue(actualMap.containsKey(entry.getKey()));
-        assertDataObjectsEquals(name + "[" + entry.getKey() + "]", entry.getValue(), actualMap
-            .get(entry.getKey()));
-      }
-
-      return;
-    }
-
-    for (Method m : expected.getClass().getMethods()) {
-      if (!m.getName().startsWith("get") && !m.getName().startsWith("supports")) {
-        continue;
-      }
-
-      if (m.getName().equals("getClass")) {
-        continue;
-      }
-
-      if (m.getParameterTypes().length != 0) {
-        continue;
-      }
-
-      Object expectedValue = m.invoke(expected, new Object[0]);
-      Object actualValue = m.invoke(actual, new Object[0]);
-
-      assertDataObjectsEquals(name + "." + m.getName(), expectedValue, actualValue);
-    }
-  }
+	public void testRepositoryInfo() throws Exception {
+		// dry run
+		RepositoryInfoImpl obj1 = new RepositoryInfoImpl();
+		RepositoryInfo obj2 = Converter.convert(Converter.convert(obj1));
+
+		assertDataObjectsEquals("RepositoryInfo", obj1, obj2);
+
+		// values
+		obj1 = new RepositoryInfoImpl();
+		obj1.setChangesIncomplete(Boolean.TRUE);
+		obj1.setChangesOnType(Collections.singletonList(BaseTypeId.CMIS_DOCUMENT));
+		obj1.setCmisVersionSupported("1.0");
+		obj1.setLatestChangeLogToken("changeLogToken");
+		obj1.setPrincipalAnonymous("principalAnonymous");
+		obj1.setPrincipalAnyone("principalAnyone");
+		obj1.setProductName("productName");
+		obj1.setProductVersion("productVersion");
+		obj1.setRepositoryDescription("description");
+		obj1.setRepositoryId("id");
+		obj1.setRepositoryName("name");
+		obj1.setRootFolder("rootFolderId");
+		obj1.setThinClientUri("thinClientUri");
+		obj1.setVendorName("vendorName");
+
+		RepositoryCapabilitiesImpl cap1 = new RepositoryCapabilitiesImpl();
+		cap1.setAllVersionsSearchable(Boolean.TRUE);
+		cap1.setCapabilityAcl(CapabilityAcl.DISCOVER);
+		cap1.setCapabilityChanges(CapabilityChanges.ALL);
+		cap1.setCapabilityContentStreamUpdates(CapabilityContentStreamUpdates.ANYTIME);
+		cap1.setCapabilityJoin(CapabilityJoin.INNERANDOUTER);
+		cap1.setCapabilityQuery(CapabilityQuery.BOTHCOMBINED);
+		cap1.setCapabilityRendition(CapabilityRenditions.READ);
+		cap1.setIsPwcSearchable(Boolean.TRUE);
+		cap1.setIsPwcUpdatable(Boolean.TRUE);
+		cap1.setSupportsGetDescendants(Boolean.TRUE);
+		cap1.setSupportsGetFolderTree(Boolean.TRUE);
+		cap1.setSupportsMultifiling(Boolean.TRUE);
+		cap1.setSupportsUnfiling(Boolean.TRUE);
+		cap1.setSupportsVersionSpecificFiling(Boolean.TRUE);
+		obj1.setRepositoryCapabilities(cap1);
+
+		AclCapabilitiesDataImpl acl1 = new AclCapabilitiesDataImpl();
+		acl1.setAclPropagation(AclPropagation.PROPAGATE);
+		List<PermissionDefinition> pddList = new ArrayList<PermissionDefinition>();
+		PermissionDefinitionDataImpl pdd1 = new PermissionDefinitionDataImpl();
+		pdd1.setPermission("test:perm1");
+		pdd1.setDescription("Permission1");
+		pddList.add(pdd1);
+		PermissionDefinitionDataImpl pdd2 = new PermissionDefinitionDataImpl();
+		pdd2.setPermission("test:perm2");
+		pdd2.setDescription("Permission2");
+		pddList.add(pdd2);
+		acl1.setPermissionDefinitionData(pddList);
+		Map<String, PermissionMapping> pmd = new LinkedHashMap<String, PermissionMapping>();
+		PermissionMappingDataImpl pmd1 = new PermissionMappingDataImpl();
+		pmd1.setKey(PermissionMapping.CAN_CREATE_DOCUMENT_FOLDER);
+		pmd1.setPermissions(Arrays.asList(new String[] { "p1", "p2" }));
+		pmd.put(pmd1.getKey(), pmd1);
+		PermissionMappingDataImpl pmd2 = new PermissionMappingDataImpl();
+		pmd2.setKey(PermissionMapping.CAN_DELETE_OBJECT);
+		pmd2.setPermissions(Arrays.asList(new String[] { "p3", "p4" }));
+		pmd.put(pmd2.getKey(), pmd2);
+		acl1.setPermissionMappingData(pmd);
+		obj1.setAclCapabilities(acl1);
+
+		obj2 = Converter.convert(Converter.convert(obj1));
+
+		assertDataObjectsEquals("RepositoryInfo", obj1, obj2);
+	}
+
+	public void testTypeDefinition() throws Exception {
+		// dry run
+		DocumentTypeDefinitionImpl obj1 = new DocumentTypeDefinitionImpl();
+		TypeDefinition obj2 = Converter.convert(Converter.convert(obj1));
+
+		assertDataObjectsEquals("TypeDefinition", obj1, obj2);
+
+		// simple values
+		obj1 = new DocumentTypeDefinitionImpl();
+		obj1.setBaseTypeId(BaseTypeId.CMIS_DOCUMENT);
+		obj1.setContentStreamAllowed(ContentStreamAllowed.ALLOWED);
+		obj1.setDescription("description");
+		obj1.setDisplayName("displayName");
+		obj1.setId("id");
+		obj1.setIsControllableAcl(Boolean.TRUE);
+		obj1.setIsControllablePolicy(Boolean.TRUE);
+		obj1.setIsCreatable(Boolean.TRUE);
+		obj1.setIsFileable(Boolean.TRUE);
+		obj1.setIsIncludedInSupertypeQuery(Boolean.TRUE);
+		obj1.setIsQueryable(Boolean.TRUE);
+		obj1.setIsVersionable(Boolean.TRUE);
+		obj1.setLocalName("localName");
+		obj1.setLocalNamespace("localNamespace");
+		obj1.setParentTypeId("parentId");
+		obj1.setQueryName("queryName");
+
+		obj2 = Converter.convert(Converter.convert(obj1));
+
+		assertDataObjectsEquals("TypeDefinition", obj1, obj2);
+	}
+
+	public void testObject() throws Exception {
+		// dry run
+		ObjectDataImpl obj1 = new ObjectDataImpl();
+		ObjectData obj2 = Converter.convert(Converter.convert(obj1));
+
+		assertDataObjectsEquals("Object", obj1, obj2);
+	}
+
+	/**
+	 * Asserts OpenCMIS data objects.
+	 */
+	protected void assertDataObjectsEquals(String name, Object expected, Object actual) throws Exception {
+		System.out.println(name);
+
+		if ((expected == null) && (actual == null)) {
+			return;
+		}
+
+		if ((expected == null) && (actual instanceof Collection<?>)) {
+			assertTrue(((Collection<?>) actual).isEmpty());
+			return;
+		} else if ((expected instanceof Collection<?>) && (actual == null)) {
+			assertTrue(((Collection<?>) expected).isEmpty());
+			return;
+		} else if ((expected == null) || (actual == null)) {
+			fail("Data object is null! name: " + name + " / expected: " + expected + " / actual: " + actual);
+		}
+
+		// handle simple types
+		if ((expected instanceof String) || (expected instanceof Boolean) || (expected instanceof BigInteger)
+				|| (expected instanceof BigDecimal) || (expected instanceof Enum<?>)) {
+			assertEquals(expected, actual);
+
+			return;
+		} else if (expected instanceof List<?>) {
+			List<?> expectedList = (List<?>) expected;
+			List<?> actualList = (List<?>) actual;
+
+			assertEquals(expectedList.size(), actualList.size());
+
+			for (int i = 0; i < expectedList.size(); i++) {
+				assertDataObjectsEquals(name + "[" + i + "]", expectedList.get(i), actualList.get(i));
+			}
+
+			return;
+		} else if (expected instanceof Map<?, ?>) {
+			Map<?, ?> expectedMap = (Map<?, ?>) expected;
+			Map<?, ?> actualMap = (Map<?, ?>) actual;
+
+			assertEquals(expectedMap.size(), actualMap.size());
+
+			for (Map.Entry<?, ?> entry : expectedMap.entrySet()) {
+				assertTrue(actualMap.containsKey(entry.getKey()));
+				assertDataObjectsEquals(name + "[" + entry.getKey() + "]", entry.getValue(), actualMap.get(entry
+						.getKey()));
+			}
+
+			return;
+		}
+
+		for (Method m : expected.getClass().getMethods()) {
+			if (!m.getName().startsWith("get") && !m.getName().startsWith("supports")) {
+				continue;
+			}
+
+			if (m.getName().equals("getClass")) {
+				continue;
+			}
+
+			if (m.getParameterTypes().length != 0) {
+				continue;
+			}
+
+			Object expectedValue = m.invoke(expected, new Object[0]);
+			Object actualValue = m.invoke(actual, new Object[0]);
+
+			assertDataObjectsEquals(name + "." + m.getName(), expectedValue, actualValue);
+		}
+	}
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MiscTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MiscTest.java?rev=934897&r1=934896&r2=934897&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MiscTest.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MiscTest.java Fri Apr 16 14:14:09 2010
@@ -30,32 +30,31 @@ import junit.framework.TestCase;
  */
 public class MiscTest extends TestCase {
 
-  public void testUrlBuilder() {
-    assertEquals("http://host/test", (new UrlBuilder("http://host/test")).toString());
-    assertEquals("http://host/test?query=value", (new UrlBuilder("http://host/test?query=value"))
-        .toString());
-    assertEquals("http://host/test", (new UrlBuilder("http://host/test?")).toString());
-
-    UrlBuilder urlBuilder;
-
-    urlBuilder = new UrlBuilder("http://host/test");
-    urlBuilder.addParameter("query", "value");
-    assertEquals("http://host/test?query=value", urlBuilder.toString());
-
-    urlBuilder = new UrlBuilder("http://host/test");
-    urlBuilder.addPath("path");
-    assertEquals("http://host/test/path", urlBuilder.toString());
-
-    urlBuilder = new UrlBuilder("http://host/test/");
-    urlBuilder.addPath("path");
-    assertEquals("http://host/test/path", urlBuilder.toString());
-
-    urlBuilder = new UrlBuilder("http://host/test");
-    urlBuilder.addPath("/path");
-    assertEquals("http://host/test/path", urlBuilder.toString());
-
-    urlBuilder = new UrlBuilder("http://host/test/");
-    urlBuilder.addPath("/path");
-    assertEquals("http://host/test/path", urlBuilder.toString());
-  }
+	public void testUrlBuilder() {
+		assertEquals("http://host/test", (new UrlBuilder("http://host/test")).toString());
+		assertEquals("http://host/test?query=value", (new UrlBuilder("http://host/test?query=value")).toString());
+		assertEquals("http://host/test", (new UrlBuilder("http://host/test?")).toString());
+
+		UrlBuilder urlBuilder;
+
+		urlBuilder = new UrlBuilder("http://host/test");
+		urlBuilder.addParameter("query", "value");
+		assertEquals("http://host/test?query=value", urlBuilder.toString());
+
+		urlBuilder = new UrlBuilder("http://host/test");
+		urlBuilder.addPath("path");
+		assertEquals("http://host/test/path", urlBuilder.toString());
+
+		urlBuilder = new UrlBuilder("http://host/test/");
+		urlBuilder.addPath("path");
+		assertEquals("http://host/test/path", urlBuilder.toString());
+
+		urlBuilder = new UrlBuilder("http://host/test");
+		urlBuilder.addPath("/path");
+		assertEquals("http://host/test/path", urlBuilder.toString());
+
+		urlBuilder = new UrlBuilder("http://host/test/");
+		urlBuilder.addPath("/path");
+		assertEquals("http://host/test/path", urlBuilder.toString());
+	}
 }



Mime
View raw message