james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [02/14] james-project git commit: JAMES-2525 adds project name from keystone v3
Date Fri, 05 Oct 2018 11:12:45 GMT
JAMES-2525 adds project name from keystone v3


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/a8824e7b
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/a8824e7b
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/a8824e7b

Branch: refs/heads/master
Commit: a8824e7ba4637bebdcc416c58c64f7af2adfc4f1
Parents: e3d62de
Author: Jean Helou <jhe@codamens.fr>
Authored: Thu Aug 30 14:59:25 2018 +0200
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Fri Oct 5 18:11:42 2018 +0700

----------------------------------------------------------------------
 .../james/blob/objectstorage/ProjectName.java   | 63 ++++++++++++++++++++
 .../blob/objectstorage/ProjectNameTest.java     | 31 ++++++++++
 2 files changed, 94 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/a8824e7b/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ProjectName.java
----------------------------------------------------------------------
diff --git a/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ProjectName.java
b/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ProjectName.java
new file mode 100644
index 0000000..b70674c
--- /dev/null
+++ b/server/blob/blob-objectstorage/src/main/java/org/apache/james/blob/objectstorage/ProjectName.java
@@ -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.james.blob.objectstorage;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Objects;
+
+public final class ProjectName {
+    public static ProjectName of(String value) {
+        return new ProjectName(value);
+    }
+
+    private final String value;
+
+    private ProjectName(String value) {
+        this.value = value;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        ProjectName that = (ProjectName) o;
+        return Objects.equal(value, that.value);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(value);
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+            .add("value", value)
+            .toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/a8824e7b/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ProjectNameTest.java
----------------------------------------------------------------------
diff --git a/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ProjectNameTest.java
b/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ProjectNameTest.java
new file mode 100644
index 0000000..19cea03
--- /dev/null
+++ b/server/blob/blob-objectstorage/src/test/java/org/apache/james/blob/objectstorage/ProjectNameTest.java
@@ -0,0 +1,31 @@
+/****************************************************************
+ * 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.james.blob.objectstorage;
+
+import org.junit.jupiter.api.Test;
+
+import nl.jqno.equalsverifier.EqualsVerifier;
+
+class ProjectNameTest {
+    @Test
+    public void projectNameShouldRespectBeanContract() {
+        EqualsVerifier.forClass(ProjectName.class).verify();
+    }
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message