chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r910572 [16/36] - in /incubator/chemistry/trunk/opencmis: ./ _dev/ opencmis-client/ opencmis-client/opencmis-client-api/ opencmis-client/opencmis-client-api/src/ opencmis-client/opencmis-client-api/src/main/ opencmis-client/opencmis-client-...
Date Tue, 16 Feb 2010 16:04:07 GMT
Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/Converter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/JaxBHelper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/JaxBHelper.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/JaxBHelper.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/JaxBHelper.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl;
+
+import java.io.OutputStream;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.opencmis.commons.impl.jaxb.CmisObjectType;
+import org.apache.opencmis.commons.impl.jaxb.CmisRepositoryInfoType;
+import org.apache.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
+import org.apache.opencmis.commons.impl.jaxb.ObjectFactory;
+
+/**
+ * JAXB helper class.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public final class JaxBHelper {
+
+  private static final QName CMIS_OBJECT = new QName(Constants.NAMESPACE_RESTATOM, "object");
+  private static final QName CMIS_TYPE_DEFINITION = new QName(Constants.NAMESPACE_RESTATOM, "type");
+  private static final QName CMIS_REPOSITORY_INFO = new QName(Constants.NAMESPACE_RESTATOM,
+      "repositoryInfo");
+
+  public static final ObjectFactory CMIS_OBJECT_FACTORY = new ObjectFactory();
+  public static final CMISExtraObjectFactory CMIS_EXTRA_OBJECT_FACTORY = new CMISExtraObjectFactory();
+  public static final JAXBContext CONTEXT;
+  static {
+    JAXBContext jc = null;
+    try {
+      jc = JAXBContext.newInstance(ObjectFactory.class, CMISExtraObjectFactory.class);
+    }
+    catch (JAXBException e) {
+      e.printStackTrace();
+    }
+    CONTEXT = jc;
+  }
+
+  @XmlRegistry
+  public static class CMISExtraObjectFactory {
+    @XmlElementDecl(namespace = Constants.NAMESPACE_RESTATOM, name = "object")
+    public JAXBElement<CmisObjectType> createObject(CmisObjectType value) {
+      return new JAXBElement<CmisObjectType>(CMIS_OBJECT, CmisObjectType.class, value);
+    }
+
+    @XmlElementDecl(namespace = Constants.NAMESPACE_RESTATOM, name = "type")
+    public JAXBElement<CmisTypeDefinitionType> createTypeDefinition(CmisTypeDefinitionType value) {
+      return new JAXBElement<CmisTypeDefinitionType>(CMIS_TYPE_DEFINITION,
+          CmisTypeDefinitionType.class, value);
+    }
+
+    @XmlElementDecl(namespace = Constants.NAMESPACE_RESTATOM, name = "repositoryInfo")
+    public JAXBElement<CmisRepositoryInfoType> createRepositoryInfo(CmisRepositoryInfoType value) {
+      return new JAXBElement<CmisRepositoryInfoType>(CMIS_REPOSITORY_INFO,
+          CmisRepositoryInfoType.class, value);
+    }
+  }
+
+  /**
+   * Private constructor.
+   */
+  private JaxBHelper() {
+  }
+
+  /**
+   * Creates an Unmarshaller.
+   */
+  public static Unmarshaller createUnmarshaller() throws JAXBException {
+    return CONTEXT.createUnmarshaller();
+  }
+
+  /**
+   * Creates an Marshaller.
+   */
+  public static Marshaller createMarshaller() throws JAXBException {
+    return CONTEXT.createMarshaller();
+  }
+
+  /**
+   * Marshals an object to a stream.
+   */
+  public static <T> void marshal(JAXBElement<T> object, OutputStream out, boolean fragment)
+      throws JAXBException {
+    if (object == null) {
+      return;
+    }
+
+    Marshaller m = CONTEXT.createMarshaller();
+    if (fragment) {
+      m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
+    }
+
+    m.marshal(object, out);
+  }
+
+  /**
+   * Marshals an object to a XMLStreamWriter.
+   */
+  public static void marshal(Object object, XMLStreamWriter out, boolean fragment)
+      throws JAXBException {
+    if (object == null) {
+      return;
+    }
+
+    Marshaller m = CONTEXT.createMarshaller();
+    if (fragment) {
+      m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
+    }
+
+    m.marshal(object, out);
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/JaxBHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/ReturnVersion.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/ReturnVersion.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/ReturnVersion.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/ReturnVersion.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl;
+
+/**
+ * Return Version Enum.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public enum ReturnVersion {
+
+  THIS("this"), LATEST("latest"), LASTESTMAJOR("latestmajor");
+  private final String value;
+
+  ReturnVersion(String v) {
+    value = v;
+  }
+
+  public String value() {
+    return value;
+  }
+
+  public static ReturnVersion fromValue(String v) {
+    for (ReturnVersion c : ReturnVersion.values()) {
+      if (c.value.equals(v)) {
+        return c;
+      }
+    }
+    throw new IllegalArgumentException(v);
+  }
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/ReturnVersion.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/UrlBuilder.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/UrlBuilder.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/UrlBuilder.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/UrlBuilder.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import org.apache.opencmis.commons.enums.IncludeRelationships;
+import org.apache.opencmis.commons.enums.RelationshipDirection;
+import org.apache.opencmis.commons.enums.UnfileObjects;
+import org.apache.opencmis.commons.enums.VersioningState;
+
+/**
+ * Utility class that helps building URLs.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class UrlBuilder {
+
+  private StringBuilder fUrl;
+  private StringBuilder fQuery;
+
+  /**
+   * Constructor.
+   * 
+   * @param url
+   *          initial URL
+   */
+  public UrlBuilder(String url) {
+    if (url == null) {
+      throw new IllegalArgumentException("URL must be set");
+    }
+
+    fUrl = new StringBuilder();
+    fQuery = new StringBuilder();
+
+    int qm = url.indexOf('?');
+    if (qm == -1) {
+      fUrl.append(url);
+    }
+    else {
+      fUrl.append(url.substring(0, qm));
+      if (qm < url.length()) {
+        fQuery.append(url.substring(qm + 1));
+      }
+    }
+  }
+
+  /**
+   * Constructor.
+   * 
+   * @param scheme
+   *          scheme
+   * @param host
+   *          host
+   * @param port
+   *          port
+   * @param path
+   *          path
+   */
+  public UrlBuilder(String scheme, String host, int port, String path) {
+
+    if ("http".equalsIgnoreCase(scheme) && (port == 80)) {
+      port = -1;
+    }
+    if ("https".equalsIgnoreCase(scheme) && (port == 443)) {
+      port = -1;
+    }
+
+    fUrl = new StringBuilder();
+    fQuery = new StringBuilder();
+
+    fUrl.append(scheme);
+    fUrl.append("://");
+    fUrl.append(host);
+    if (port > 0) {
+      fUrl.append(":" + port);
+    }
+    if (path != null) {
+      fUrl.append(path);
+    }
+  }
+
+  /**
+   * Copy constructor.
+   */
+  public UrlBuilder(UrlBuilder urlBuilder) {
+    fUrl = new StringBuilder(urlBuilder.fUrl);
+    fQuery = new StringBuilder(urlBuilder.fQuery);
+  }
+
+  /**
+   * Adds a parameter to the URL.
+   * 
+   * @param name
+   *          parameter name
+   * @param value
+   *          parameter value
+   */
+  public void addParameter(String name, Object value) {
+    if ((name == null) || (value == null)) {
+      return;
+    }
+
+    String valueStr = normalizeParameter(value);
+
+    if (fQuery.length() > 0) {
+      fQuery.append('&');
+    }
+    fQuery.append(name);
+    fQuery.append("=");
+    try {
+      fQuery.append(URLEncoder.encode(valueStr, "UTF-8"));
+    }
+    catch (UnsupportedEncodingException e) {
+    }
+  }
+
+  /**
+   * Adds a path segment to the URL.
+   * 
+   * @param pathSegment
+   *          the path segment.
+   */
+  public void addPath(String pathSegment) {
+    if ((pathSegment == null) || (pathSegment.length() == 0)) {
+      return;
+    }
+
+    if (fUrl.charAt(fUrl.length() - 1) != '/') {
+      fUrl.append('/');
+    }
+
+    if (pathSegment.charAt(0) == '/') {
+      pathSegment = pathSegment.substring(1);
+    }
+
+    try {
+      fUrl.append(URLEncoder.encode(pathSegment, "UTF-8"));
+    }
+    catch (UnsupportedEncodingException e) {
+    }
+  }
+
+  /**
+   * Converts an object to a String that can be used as a parameter value.
+   */
+  public static String normalizeParameter(Object value) {
+    if (value == null) {
+      return null;
+    }
+    else if (value instanceof IncludeRelationships) {
+      return ((IncludeRelationships) value).value();
+    }
+    else if (value instanceof VersioningState) {
+      return ((VersioningState) value).value();
+    }
+    else if (value instanceof UnfileObjects) {
+      return ((UnfileObjects) value).value();
+    }
+    else if (value instanceof RelationshipDirection) {
+      return ((RelationshipDirection) value).value();
+    }
+    else if (value instanceof ReturnVersion) {
+      return ((ReturnVersion) value).value();
+    }
+
+    return value.toString();
+  }
+
+  @Override
+  public String toString() {
+    return fUrl.toString() + (fQuery.length() == 0 ? "" : "?" + fQuery.toString());
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/UrlBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractExtensionData.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractExtensionData.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractExtensionData.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractExtensionData.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.api.ExtensionsData;
+
+/**
+ * Abstract extension data implementation.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public abstract class AbstractExtensionData implements ExtensionsData {
+
+  private List<Object> fExtensions;
+
+  /* (non-Javadoc)
+   * @see org.apache.opencmis.client.provider.ExtensionsData#getExtensions()
+   */
+  public List<Object> getExtensions() {
+    return fExtensions;
+  }
+
+  /* (non-Javadoc)
+   * @see org.apache.opencmis.client.provider.ExtensionsData#setExtensions(java.util.List)
+   */
+  public void setExtensions(List<Object> extensions) {
+    fExtensions = extensions;
+  }
+
+  @Override
+  public String toString() {
+    return "[extensions=" + fExtensions + "]";
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractExtensionData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyData.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyData.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyData.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyData.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.opencmis.commons.provider.PropertyData;
+
+/**
+ * Abstract property data implementation.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public abstract class AbstractPropertyData<T> extends AbstractExtensionData implements
+    PropertyData<T> {
+
+  private String fId;
+  private String fDisplayName;
+  private String fLocalName;
+  private String fQueryName;
+
+  private List<T> fValues;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyData#getId()
+   */
+  public String getId() {
+    return fId;
+  }
+
+  public void setId(String id) {
+    fId = id;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyData#getDisplayName()
+   */
+  public String getDisplayName() {
+    return fDisplayName;
+  }
+
+  public void setDisplayName(String displayName) {
+    fDisplayName = displayName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyData#getLocalName()
+   */
+  public String getLocalName() {
+    return fLocalName;
+  }
+
+  public void setLocalName(String localName) {
+    fLocalName = localName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyData#getQueryName()
+   */
+  public String getQueryName() {
+    return fQueryName;
+  }
+
+  public void setQueryName(String queryName) {
+    fQueryName = queryName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyData#getValues()
+   */
+  public List<T> getValues() {
+    return fValues;
+  }
+
+  public void setValues(List<T> values) {
+    fValues = values;
+  }
+
+  public void setValue(T value) {
+    fValues = new ArrayList<T>(1);
+    fValues.add(value);
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyData#getFirstValue()
+   */
+  public T getFirstValue() {
+    if ((fValues != null) && (!fValues.isEmpty())) {
+      return fValues.get(0);
+    }
+
+    return null;
+  }
+
+  @Override
+  public String toString() {
+    return "Property [id=" + fId + ", display Name=" + fDisplayName + ", local name=" + fLocalName
+        + ", query name=" + fQueryName + ", values=" + fValues + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,280 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.api.Choice;
+import org.apache.opencmis.commons.api.PropertyDefinition;
+import org.apache.opencmis.commons.enums.Cardinality;
+import org.apache.opencmis.commons.enums.PropertyType;
+import org.apache.opencmis.commons.enums.Updatability;
+
+/**
+ * Abstract property definition data implementation.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public abstract class AbstractPropertyDefinition<T> extends AbstractExtensionData implements
+    PropertyDefinition<T> {
+
+  private static final long serialVersionUID = 1L;
+
+  private String fId;
+  private String fLocalName;
+  private String fLocalNamespace;
+  private String fQueryName;
+  private String fDisplayName;
+  private String fDescription;
+  private PropertyType fPropertyType;
+  private Cardinality fCardinality;
+  private List<Choice<T>> fChoiceList;
+  private List<T> fDefaultValue;
+  private Updatability fUpdatability;
+  private Boolean fIsInherited;
+  private Boolean fIsQueryable;
+  private Boolean fIsOrderable;
+  private Boolean fIsRequired;
+  private Boolean fIsOpenChoice;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getId()
+   */
+  public String getId() {
+    return fId;
+  }
+
+  public void setId(String id) {
+    fId = id;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getLocalName()
+   */
+  public String getLocalName() {
+    return fLocalName;
+  }
+
+  public void setLocalName(String localName) {
+    fLocalName = localName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getLocalNamespace()
+   */
+  public String getLocalNamespace() {
+    return fLocalNamespace;
+  }
+
+  public void setLocalNamespace(String localNamespace) {
+    fLocalNamespace = localNamespace;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getQueryName()
+   */
+  public String getQueryName() {
+    return fQueryName;
+  }
+
+  public void setQueryName(String queryName) {
+    fQueryName = queryName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getDisplayName()
+   */
+  public String getDisplayName() {
+    return fDisplayName;
+  }
+
+  public void setDisplayName(String displayName) {
+    fDisplayName = displayName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getDescription()
+   */
+  public String getDescription() {
+    return fDescription;
+  }
+
+  public void setDescription(String description) {
+    fDescription = description;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getPropertyType()
+   */
+  public PropertyType getPropertyType() {
+    return fPropertyType;
+  }
+
+  public void setPropertyType(PropertyType propertyType) {
+    fPropertyType = propertyType;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getCardinality()
+   */
+  public Cardinality getCardinality() {
+    return fCardinality;
+  }
+
+  public void setCardinality(Cardinality cardinality) {
+    fCardinality = cardinality;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getChoices()
+   */
+  public List<Choice<T>> getChoices() {
+    return fChoiceList;
+  }
+
+  public void setChoices(List<Choice<T>> choiceList) {
+    fChoiceList = choiceList;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getDefaultValue()
+   */
+  public List<T> getDefaultValue() {
+    return fDefaultValue;
+  }
+
+  public void setDefaultValue(List<T> defaultValue) {
+    fDefaultValue = defaultValue;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#getUpdatability()
+   */
+  public Updatability getUpdatability() {
+    return fUpdatability;
+  }
+
+  public void setUpdatability(Updatability updatability) {
+    fUpdatability = updatability;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#isInherited()
+   */
+  public Boolean isInherited() {
+    return fIsInherited;
+  }
+
+  public void setIsInherited(Boolean isInherited) {
+    fIsInherited = isInherited;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#isQueryable()
+   */
+  public Boolean isQueryable() {
+    return fIsQueryable;
+  }
+
+  public void setIsQueryable(Boolean isQueryable) {
+    fIsQueryable = isQueryable;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#isOrderable()
+   */
+  public Boolean isOrderable() {
+    return fIsOrderable;
+  }
+
+  public void setIsOrderable(Boolean isOrderable) {
+    fIsOrderable = isOrderable;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#isRequired()
+   */
+  public Boolean isRequired() {
+    return fIsRequired;
+  }
+
+  public void setIsRequired(Boolean isRequired) {
+    fIsRequired = isRequired;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.PropertyDefinitionData#isOpenChoice()
+   */
+  public Boolean isOpenChoice() {
+    return fIsOpenChoice;
+  }
+
+  public void setIsOpenChoice(Boolean isOpenChoice) {
+    fIsOpenChoice = isOpenChoice;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "Property Definition [id=" + fId + ", display name=" + fDisplayName + ", description="
+        + fDescription + ", local name=" + fLocalName + ", local namespace=" + fLocalNamespace
+        + ", query name=" + fQueryName + ", property type=" + fPropertyType + ", cardinality="
+        + fCardinality + ", choice list=" + fChoiceList + ", default value=" + fDefaultValue
+        + ", is inherited=" + fIsInherited + ", is open choice=" + fIsOpenChoice
+        + ", is queryable=" + fIsQueryable + ", is required=" + fIsRequired + ", updatability="
+        + fUpdatability + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractPropertyDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,309 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.opencmis.commons.api.PropertyDefinition;
+import org.apache.opencmis.commons.api.TypeDefinition;
+import org.apache.opencmis.commons.enums.BaseObjectTypeIds;
+
+/**
+ * Abstract type definition data implementation.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public abstract class AbstractTypeDefinition extends AbstractExtensionData implements
+    TypeDefinition, Cloneable {
+
+  private static final long serialVersionUID = 1L;
+
+  private String fId;
+  private String fLocalName;
+  private String fLocalNamespace;
+  private String fQueryName;
+  private String fDisplayName;
+  private String fDescription;
+  private BaseObjectTypeIds fBaseId;
+  private String fParentId;
+  private Boolean fIsCreatable;
+  private Boolean fIsFileable;
+  private Boolean fIsQueryable;
+  private Boolean fIsIncludedInSupertypeQuery;
+  private Boolean fIsFulltextIndexed;
+  private Boolean fIsControllableACL;
+  private Boolean fIsControllablePolicy;
+  private Map<String, PropertyDefinition<?>> fPropertyDefinitions;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getId()
+   */
+  public String getId() {
+    return fId;
+  }
+
+  public void setId(String id) {
+    fId = id;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getLocalName()
+   */
+  public String getLocalName() {
+    return fLocalName;
+  }
+
+  public void setLocalName(String localName) {
+    fLocalName = localName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getLocalNamespace()
+   */
+  public String getLocalNamespace() {
+    return fLocalNamespace;
+  }
+
+  public void setLocalNamespace(String localNamespace) {
+    fLocalNamespace = localNamespace;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getQueryName()
+   */
+  public String getQueryName() {
+    return fQueryName;
+  }
+
+  public void setQueryName(String queryName) {
+    fQueryName = queryName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getDisplayName()
+   */
+  public String getDisplayName() {
+    return fDisplayName;
+  }
+
+  public void setDisplayName(String displayName) {
+    fDisplayName = displayName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getDescription()
+   */
+  public String getDescription() {
+    return fDescription;
+  }
+
+  public void setDescription(String description) {
+    fDescription = description;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getBaseId()
+   */
+  public BaseObjectTypeIds getBaseId() {
+    return fBaseId;
+  }
+
+  public void setBaseId(BaseObjectTypeIds baseId) {
+    fBaseId = baseId;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getParentId()
+   */
+  public String getParentId() {
+    return fParentId;
+  }
+
+  public void setParentId(String parentId) {
+    fParentId = parentId;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#isCreatable()
+   */
+  public Boolean isCreatable() {
+    return fIsCreatable;
+  }
+
+  public void setIsCreatable(Boolean isCreatable) {
+    fIsCreatable = isCreatable;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#isFileable()
+   */
+  public Boolean isFileable() {
+    return fIsFileable;
+  }
+
+  public void setIsFileable(Boolean isFileable) {
+    fIsFileable = isFileable;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#isQueryable()
+   */
+  public Boolean isQueryable() {
+    return fIsQueryable;
+  }
+
+  public void setIsQueryable(Boolean isQueryable) {
+    fIsQueryable = isQueryable;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#isIncludedInSupertypeQuery()
+   */
+  public Boolean isIncludedInSupertypeQuery() {
+    return fIsIncludedInSupertypeQuery;
+  }
+
+  public void setIsIncludedInSupertypeQuery(Boolean isIncludedInSupertypeQuery) {
+    fIsIncludedInSupertypeQuery = isIncludedInSupertypeQuery;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#isFulltextIndexed()
+   */
+  public Boolean isFulltextIndexed() {
+    return fIsFulltextIndexed;
+  }
+
+  public void setIsFulltextIndexed(Boolean isFulltextIndexed) {
+    fIsFulltextIndexed = isFulltextIndexed;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#isControllableACL()
+   */
+  public Boolean isControllableAcl() {
+    return fIsControllableACL;
+  }
+
+  public void setIsControllableAcl(Boolean isControllableACL) {
+    fIsControllableACL = isControllableACL;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#isControllablePolicy()
+   */
+  public Boolean isControllablePolicy() {
+    return fIsControllablePolicy;
+  }
+
+  public void setIsControllablePolicy(Boolean isControllablePolicy) {
+    fIsControllablePolicy = isControllablePolicy;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * 
+   * @see org.apache.opencmis.client.provider.TypeDefinitionData#getPropertyDefintions()
+   */
+  public Map<String, PropertyDefinition<?>> getPropertyDefinitions() {
+    return fPropertyDefinitions;
+  }
+
+  public void setPropertyDefinitions(Map<String, PropertyDefinition<?>> propertyDefinitions) {
+    fPropertyDefinitions = propertyDefinitions;
+  }
+
+  /**
+   * Adds a property definition.
+   * 
+   * @param propertyDefinition
+   *          the property definition
+   */
+  public void addPropertyDefinition(PropertyDefinition<?> propertyDefinition) {
+    if (propertyDefinition == null) {
+      return;
+    }
+
+    if (fPropertyDefinitions == null) {
+      fPropertyDefinitions = new LinkedHashMap<String, PropertyDefinition<?>>();
+    }
+
+    fPropertyDefinitions.put(propertyDefinition.getId(), propertyDefinition);
+  }
+
+  public AbstractTypeDefinition clone() {
+    try {
+      return (AbstractTypeDefinition) super.clone();
+    }
+    catch (CloneNotSupportedException e) {
+      e.printStackTrace();
+      throw new RuntimeException("Clone not supported", e);
+    }
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "Type Definition [base id=" + fBaseId + ", id=" + fId + ", display Name=" + fDisplayName
+        + ", description=" + fDescription + ", local name=" + fLocalName + ", local namespace="
+        + fLocalNamespace + ", query name=" + fQueryName + ", parent id=" + fParentId
+        + ", is controllable ACL=" + fIsControllableACL + ", is controllable policy="
+        + fIsControllablePolicy + ", is creatable=" + fIsCreatable + ", is fileable=" + fIsFileable
+        + ", is fulltext indexed=" + fIsFulltextIndexed + ", is included in supertype query="
+        + fIsIncludedInSupertypeQuery + ", is queryable=" + fIsQueryable
+        + ", property definitions=" + fPropertyDefinitions + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AbstractTypeDefinition.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlEntryImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlEntryImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlEntryImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlEntryImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.provider.AccessControlEntry;
+import org.apache.opencmis.commons.provider.AccessControlPrincipalData;
+
+/**
+ * Access Control Entry data implementation.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AccessControlEntryImpl extends AbstractExtensionData implements AccessControlEntry {
+
+  private List<String> fPermissions;
+  private AccessControlPrincipalData fPrincipal;
+  private boolean fIsDirect = true;
+
+  /**
+   * Constructor.
+   */
+  public AccessControlEntryImpl() {
+  }
+
+  /**
+   * Constructor.
+   */
+  public AccessControlEntryImpl(AccessControlPrincipalData principal, List<String> permissions) {
+    setPrincipal(principal);
+    setPermissions(permissions);
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.AccessControlEntry#getPrincipal()
+   */
+  public AccessControlPrincipalData getPrincipal() {
+    return fPrincipal;
+  }
+
+  public void setPrincipal(AccessControlPrincipalData principal) {
+    fPrincipal = principal;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.AccessControlEntry#getPermissions()
+   */
+  public List<String> getPermissions() {
+    return fPermissions;
+  }
+
+  public void setPermissions(List<String> permissions) {
+    fPermissions = permissions;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.AccessControlEntry#isDirect()
+   */
+  public boolean isDirect() {
+    return fIsDirect;
+  }
+
+  public void setDirect(boolean direct) {
+    fIsDirect = direct;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "Access Control Entry [principal=" + fPrincipal + ", permissions=" + fPermissions
+        + ", is direct=" + fIsDirect + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlEntryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlListImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlListImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlListImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlListImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.provider.AccessControlEntry;
+import org.apache.opencmis.commons.provider.AccessControlList;
+
+/**
+ * Access control list data implementation.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AccessControlListImpl extends AbstractExtensionData implements AccessControlList {
+
+  private List<AccessControlEntry> fAces;
+  private Boolean fIsExact;
+
+  /**
+   * Constructor.
+   */
+  public AccessControlListImpl() {
+  }
+
+  /**
+   * Constructor.
+   */
+  public AccessControlListImpl(List<AccessControlEntry> aces) {
+    setAces(aces);
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.AccessControlList#getACEs()
+   */
+  public List<AccessControlEntry> getAces() {
+    return fAces;
+  }
+
+  public void setAces(List<AccessControlEntry> aces) {
+    fAces = aces;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.AccessControlList#isExact()
+   */
+  public Boolean isExact() {
+    return fIsExact;
+  }
+
+  public void setExact(Boolean isExact) {
+    fIsExact = isExact;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "Access Control List [ACEs=" + fAces + ", is exact=" + fIsExact + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlListImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlPrincipalDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlPrincipalDataImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlPrincipalDataImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlPrincipalDataImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import org.apache.opencmis.commons.provider.AccessControlPrincipalData;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AccessControlPrincipalDataImpl extends AbstractExtensionData implements
+    AccessControlPrincipalData {
+
+  private String fPrincipalId;
+
+  /**
+   * Constructor.
+   */
+  public AccessControlPrincipalDataImpl() {
+  }
+
+  /**
+   * Constructor with principal id.
+   */
+  public AccessControlPrincipalDataImpl(String principalId) {
+    setPrincipalId(principalId);
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.AccessControlPrincipalData#getPrincipalId()
+   */
+  public String getPrincipalId() {
+    return fPrincipalId;
+  }
+
+  public void setPrincipalId(String principalId) {
+    fPrincipalId = principalId;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "Access Control Principal [principalId=" + fPrincipalId + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AccessControlPrincipalDataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AclCapabilitiesDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AclCapabilitiesDataImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AclCapabilitiesDataImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AclCapabilitiesDataImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.enums.AclPropagation;
+import org.apache.opencmis.commons.enums.SupportedPermissions;
+import org.apache.opencmis.commons.provider.AclCapabilitiesData;
+import org.apache.opencmis.commons.provider.PermissionDefinitionData;
+import org.apache.opencmis.commons.provider.PermissionMappingData;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AclCapabilitiesDataImpl extends AbstractExtensionData implements AclCapabilitiesData {
+
+  private static final long serialVersionUID = 1L;
+
+  private SupportedPermissions fSupportedPermissions;
+  private AclPropagation fACLPropagation;
+  private List<PermissionMappingData> fPermissionMappingList;
+  private List<PermissionDefinitionData> fPermissionDefinitionList;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ACLCapabilitiesData#getACLPropagation()
+   */
+  public SupportedPermissions getSupportedPermissions() {
+    return fSupportedPermissions;
+  }
+
+  public void setSupportedPermissions(SupportedPermissions supportedPermissions) {
+    fSupportedPermissions = supportedPermissions;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ACLCapabilitiesData#getACLPropagation()
+   */
+  public AclPropagation getAclPropagation() {
+    return fACLPropagation;
+  }
+
+  public void setAclPropagation(AclPropagation aclPropagation) {
+    fACLPropagation = aclPropagation;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ACLCapabilitiesData#getPermissionMappingData()
+   */
+  public List<PermissionMappingData> getPermissionMappingData() {
+    return fPermissionMappingList;
+  }
+
+  public void setPermissionMappingData(List<PermissionMappingData> permissionMappingList) {
+    fPermissionMappingList = permissionMappingList;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ACLCapabilitiesData#getPermissionDefinitionData()
+   */
+  public List<PermissionDefinitionData> getPermissionDefinitionData() {
+    return fPermissionDefinitionList;
+  }
+
+  public void setPermissionDefinitionData(List<PermissionDefinitionData> permissionDefinitionList) {
+    fPermissionDefinitionList = permissionDefinitionList;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "ACL Capabilities [ACL propagation=" + fACLPropagation + ", permission definition list="
+        + fPermissionDefinitionList + ", permission mappings=" + fPermissionMappingList + "]"
+        + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AclCapabilitiesDataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AllowableActionsDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AllowableActionsDataImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AllowableActionsDataImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AllowableActionsDataImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.Map;
+
+import org.apache.opencmis.commons.provider.AllowableActionsData;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class AllowableActionsDataImpl extends AbstractExtensionData implements AllowableActionsData {
+
+  private Map<String, Boolean> fAllowableActions;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.AllowableActionsData#getAllowableActions()
+   */
+  public Map<String, Boolean> getAllowableActions() {
+    return fAllowableActions;
+  }
+
+  public void setAllowableActions(Map<String, Boolean> allowableActions) {
+    fAllowableActions = allowableActions;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "Allowable Actions [allowable actions=" + fAllowableActions + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/AllowableActionsDataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChangeEventInfoDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChangeEventInfoDataImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChangeEventInfoDataImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChangeEventInfoDataImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.GregorianCalendar;
+
+import org.apache.opencmis.commons.enums.TypeOfChanges;
+import org.apache.opencmis.commons.provider.ChangeEventInfoData;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class ChangeEventInfoDataImpl extends AbstractExtensionData implements ChangeEventInfoData {
+
+  private GregorianCalendar fChangeTime;
+  private TypeOfChanges fTypeOfChanges;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ChangeEventInfoData#getChangeTime()
+   */
+  public GregorianCalendar getChangeTime() {
+    return fChangeTime;
+  }
+
+  public void setChangeTime(GregorianCalendar changeTime) {
+    fChangeTime = changeTime;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ChangeEventInfoData#getChangeType()
+   */
+  public TypeOfChanges getChangeType() {
+    return fTypeOfChanges;
+  }
+
+  public void setTypeOfChanges(TypeOfChanges typeOfChanges) {
+    fTypeOfChanges = typeOfChanges;
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChangeEventInfoDataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChoiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChoiceImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChoiceImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChoiceImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.api.Choice;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class ChoiceImpl<T> extends AbstractExtensionData implements Choice<T> {
+
+  private String fDisplayName;
+  private List<T> fValue;
+  private List<Choice<T>> fChoice;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.Choice#getDisplayName()
+   */
+  public String getDisplayName() {
+    return fDisplayName;
+  }
+
+  public void setDisplayName(String displayName) {
+    fDisplayName = displayName;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.Choice#getValue()
+   */
+  public List<T> getValue() {
+    return fValue;
+  }
+
+  public void setValue(List<T> value) {
+    fValue = value;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.Choice#getChoice()
+   */
+  public List<Choice<T>> getChoice() {
+    return fChoice;
+  }
+
+  public void setChoice(List<Choice<T>> choice) {
+    fChoice = choice;
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ChoiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.io.InputStream;
+import java.math.BigInteger;
+
+import org.apache.opencmis.commons.provider.ContentStreamData;
+
+/**
+ * Content stream data implementation.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class ContentStreamDataImpl extends AbstractExtensionData implements ContentStreamData {
+
+  private String fFilename;
+  private BigInteger fLength;
+  private String fMimeType;
+  private InputStream fStream;
+
+  /**
+   * Constructor.
+   */
+  public ContentStreamDataImpl() {
+  }
+
+  /**
+   * Constructor.
+   */
+  public ContentStreamDataImpl(BigInteger length, String mimetype, String filename,
+      InputStream stream) {
+    setLength(length);
+    setMimeType(mimetype);
+    setFilename(filename);
+    setStream(stream);
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ContentStreamData#getFilename()
+   */
+  public String getFilename() {
+    return fFilename;
+  }
+
+  public void setFilename(String filename) {
+    fFilename = filename;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ContentStreamData#getLength()
+   */
+  public BigInteger getLength() {
+    return fLength;
+  }
+
+  public void setLength(BigInteger length) {
+    fLength = length;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ContentStreamData#getMimeType()
+   */
+  public String getMimeType() {
+    return fMimeType;
+  }
+
+  public void setMimeType(String mimetype) {
+    fMimeType = mimetype;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ContentStreamData#getStream()
+   */
+  public InputStream getStream() {
+    return fStream;
+  }
+
+  public void setStream(InputStream stream) {
+    fStream = stream;
+  }
+
+  @Override
+  public String toString() {
+    return "ContentStream [filename=" + fFilename + ", length=" + fLength + ", MIME type="
+        + fMimeType + ", has stream=" + (fStream != null) + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ContentStreamDataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import org.apache.opencmis.commons.api.DocumentTypeDefinition;
+import org.apache.opencmis.commons.enums.ContentStreamAllowed;
+
+/**
+ * Document type definition.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class DocumentTypeDefinitionImpl extends AbstractTypeDefinition implements
+    DocumentTypeDefinition {
+
+  private static final long serialVersionUID = 1L;
+
+  private ContentStreamAllowed fContentStreamAllowed;
+  private Boolean fIsVersionable;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.DocumentTypeDefinitionData#getContentStreamAllowed()
+   */
+  public ContentStreamAllowed getContentStreamAllowed() {
+    return fContentStreamAllowed;
+  }
+
+  public void setContentStreamAllowed(ContentStreamAllowed contentStreamAllowed) {
+    fContentStreamAllowed = contentStreamAllowed;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.DocumentTypeDefinitionData#isVersionable()
+   */
+  public Boolean isVersionable() {
+    return fIsVersionable;
+  }
+
+  public void setIsVersionable(Boolean isVersionable) {
+    fIsVersionable = isVersionable;
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/DocumentTypeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ExtensionDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ExtensionDataImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ExtensionDataImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ExtensionDataImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import org.apache.opencmis.commons.api.ExtensionsData;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class ExtensionDataImpl extends AbstractExtensionData implements ExtensionsData {
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ExtensionDataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FailedToDeleteDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FailedToDeleteDataImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FailedToDeleteDataImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FailedToDeleteDataImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.provider.FailedToDeleteData;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class FailedToDeleteDataImpl extends AbstractExtensionData implements FailedToDeleteData {
+
+  private List<String> fIds;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.FailedToDeleteData#getIds()
+   */
+  public List<String> getIds() {
+    return fIds;
+  }
+
+  public void setIds(List<String> ids) {
+    fIds = ids;
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FailedToDeleteDataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import org.apache.opencmis.commons.api.FolderTypeDefinition;
+
+/**
+ * Folder type definition.
+ * 
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class FolderTypeDefinitionImpl extends AbstractTypeDefinition implements
+    FolderTypeDefinition {
+
+  private static final long serialVersionUID = 1L;
+
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/FolderTypeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectDataImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectDataImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectDataImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,215 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.PropertyIds;
+import org.apache.opencmis.commons.enums.BaseObjectTypeIds;
+import org.apache.opencmis.commons.provider.AccessControlList;
+import org.apache.opencmis.commons.provider.AllowableActionsData;
+import org.apache.opencmis.commons.provider.ChangeEventInfoData;
+import org.apache.opencmis.commons.provider.ObjectData;
+import org.apache.opencmis.commons.provider.PolicyIdListData;
+import org.apache.opencmis.commons.provider.PropertiesData;
+import org.apache.opencmis.commons.provider.PropertyData;
+import org.apache.opencmis.commons.provider.RenditionData;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class ObjectDataImpl extends AbstractExtensionData implements ObjectData {
+
+  private PropertiesData fProperties;
+  private ChangeEventInfoData fChangeEventInfo;
+  private List<ObjectData> fRelationships;
+  private List<RenditionData> fRenditions;
+  private PolicyIdListData fPolicyIds;
+  private AllowableActionsData fAllowableActions;
+  private AccessControlList fAcl;
+  private Boolean fIsExactAcl;
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getId()
+   */
+  public String getId() {
+    Object value = getFirstValue(PropertyIds.CMIS_OBJECT_ID);
+    if (value instanceof String) {
+      return (String) value;
+    }
+
+    return null;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getBaseTypeId()
+   */
+  public BaseObjectTypeIds getBaseTypeId() {
+    Object value = getFirstValue(PropertyIds.CMIS_BASE_TYPE_ID);
+    if (value instanceof String) {
+      try {
+        return BaseObjectTypeIds.fromValue((String) value);
+      }
+      catch (Exception e) {
+      }
+    }
+
+    return null;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getProperties()
+   */
+  public PropertiesData getProperties() {
+    return fProperties;
+  }
+
+  public void setProperties(PropertiesData properties) {
+    fProperties = properties;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getChangeEventInfo()
+   */
+  public ChangeEventInfoData getChangeEventInfo() {
+    return fChangeEventInfo;
+  }
+
+  public void setChangeEventInfo(ChangeEventInfoData changeEventInfo) {
+    fChangeEventInfo = changeEventInfo;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getRelationships()
+   */
+  public List<ObjectData> getRelationships() {
+    return fRelationships;
+  }
+
+  public void setRelationships(List<ObjectData> relationships) {
+    fRelationships = relationships;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getRenditions()
+   */
+  public List<RenditionData> getRenditions() {
+    return fRenditions;
+  }
+
+  public void setRenditions(List<RenditionData> renditions) {
+    fRenditions = renditions;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getPolicyIds()
+   */
+  public PolicyIdListData getPolicyIds() {
+    return fPolicyIds;
+  }
+
+  public void setPolicyIds(PolicyIdListData policyIds) {
+    fPolicyIds = policyIds;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getAllowableActions()
+   */
+  public AllowableActionsData getAllowableActions() {
+    return fAllowableActions;
+  }
+
+  public void setAllowableActions(AllowableActionsData allowableActions) {
+    fAllowableActions = allowableActions;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#getACL()
+   */
+  public AccessControlList getAcl() {
+    return fAcl;
+  }
+
+  public void setAcl(AccessControlList acl) {
+    fAcl = acl;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectData#isExactACL()
+   */
+  public Boolean isExactAcl() {
+    return fIsExactAcl;
+  }
+
+  public void setIsExactAcl(Boolean isExactACL) {
+    fIsExactAcl = isExactACL;
+  }
+
+  // ---- internal ----
+
+  /**
+   * Returns the first value of a property or <code>null</code> if the property is not set.
+   */
+  private Object getFirstValue(String id) {
+    if ((fProperties == null) || (fProperties.getProperties() == null)) {
+      return null;
+    }
+
+    PropertyData<?> property = fProperties.getProperties().get(id);
+    if (property == null) {
+      return null;
+    }
+
+    return property.getFirstValue();
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "Object Data [properties=" + fProperties + ", allowable actions=" + fAllowableActions
+        + ", change event info=" + fChangeEventInfo + ", ACL=" + fAcl + ", is exact ACL="
+        + fIsExactAcl + ", policy ids=" + fPolicyIds + ", relationships=" + fRelationships
+        + ", renditions=" + fRenditions + "]" + super.toString();
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectDataImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectInFolderContainerImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectInFolderContainerImpl.java?rev=910572&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectInFolderContainerImpl.java (added)
+++ incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectInFolderContainerImpl.java Tue Feb 16 16:03:38 2010
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.opencmis.commons.impl.dataobjects;
+
+import java.util.List;
+
+import org.apache.opencmis.commons.provider.ObjectInFolderContainer;
+import org.apache.opencmis.commons.provider.ObjectInFolderData;
+
+/**
+ * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
+ * 
+ */
+public class ObjectInFolderContainerImpl extends AbstractExtensionData implements
+    ObjectInFolderContainer {
+
+  private ObjectInFolderData fObject;
+  private List<ObjectInFolderContainer> fChildren;
+
+  /**
+   * Constructor.
+   */
+  public ObjectInFolderContainerImpl() {
+
+  }
+
+  /**
+   * Constructor.
+   */
+  public ObjectInFolderContainerImpl(ObjectInFolderData object) {
+    setObject(object);
+
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectInFolderContainer#getObject()
+   */
+  public ObjectInFolderData getObject() {
+    return fObject;
+  }
+
+  public void setObject(ObjectInFolderData object) {
+    fObject = object;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.provider.ObjectInFolderContainer#getChildren()
+   */
+  public List<ObjectInFolderContainer> getChildren() {
+    return fChildren;
+  }
+
+  public void setChildren(List<ObjectInFolderContainer> children) {
+    fChildren = children;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "ObjectInFolder Container [object=" + fObject + ", children=" + fChildren + "]";
+  }
+}

Propchange: incubator/chemistry/trunk/opencmis/opencmis-commons/opencmis-commons-impl/src/main/java/org/apache/opencmis/commons/impl/dataobjects/ObjectInFolderContainerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message