From ae76e0ca2e277d70c17c6d0a470475dc38c1135a Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Wed, 6 Sep 2017 12:33:35 -0400 Subject: [PATCH] docs(javadocs): added license headers and fixed javadocs. --- .../com/syncleus/ferma/WrappedTransaction.java | 4 ++-- .../com/syncleus/ferma/tx/FramedTxGraph.java | 17 ++++++++++++++++- src/main/java/com/syncleus/ferma/tx/Tx.java | 2 -- .../java/com/syncleus/ferma/tx/TxAction.java | 15 +++++++++++++++ .../java/com/syncleus/ferma/tx/TxAction0.java | 15 +++++++++++++++ .../java/com/syncleus/ferma/tx/TxAction1.java | 15 +++++++++++++++ .../java/com/syncleus/ferma/tx/TxAction2.java | 15 +++++++++++++++ .../java/com/syncleus/ferma/tx/TxFactory.java | 9 ++++++--- .../syncleus/ferma/tx/WrappedFramedTxGraph.java | 15 +++++++++++++++ .../java/com/syncleus/ferma/tx/DummyGraph.java | 15 +++++++++++++++ .../com/syncleus/ferma/tx/DummyTransaction.java | 15 +++++++++++++++ .../com/syncleus/ferma/tx/TxFactoryTest.java | 15 +++++++++++++++ 12 files changed, 144 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/syncleus/ferma/WrappedTransaction.java b/src/main/java/com/syncleus/ferma/WrappedTransaction.java index adc77940..282ffdc9 100644 --- a/src/main/java/com/syncleus/ferma/WrappedTransaction.java +++ b/src/main/java/com/syncleus/ferma/WrappedTransaction.java @@ -100,13 +100,13 @@ public interface WrappedTransaction extends AutoCloseable { /** * Returns the raw wrapped tinkerpop transaction. - * @return + * @return wrapped tinkerpop transaction. */ Transaction getDelegate(); /** * Returns the parent graph for the transaction. - * @return + * @return parent graph. */ WrappedFramedGraph<? extends Graph> getGraph(); } diff --git a/src/main/java/com/syncleus/ferma/tx/FramedTxGraph.java b/src/main/java/com/syncleus/ferma/tx/FramedTxGraph.java index 5a327b52..8027d4cb 100644 --- a/src/main/java/com/syncleus/ferma/tx/FramedTxGraph.java +++ b/src/main/java/com/syncleus/ferma/tx/FramedTxGraph.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; import com.syncleus.ferma.FramedGraph; @@ -27,7 +42,7 @@ public interface FramedTxGraph extends FramedGraph { /** * Create a new transaction. * - * @return + * @return new transaction. */ Tx createTx(); diff --git a/src/main/java/com/syncleus/ferma/tx/Tx.java b/src/main/java/com/syncleus/ferma/tx/Tx.java index acbcff73..6925d450 100644 --- a/src/main/java/com/syncleus/ferma/tx/Tx.java +++ b/src/main/java/com/syncleus/ferma/tx/Tx.java @@ -63,8 +63,6 @@ public interface Tx extends WrappedTransaction { /** * Invoke rollback or commit when closing the autoclosable. By default a rollback will be invoked. - * - * @throws IOException */ @Override void close(); diff --git a/src/main/java/com/syncleus/ferma/tx/TxAction.java b/src/main/java/com/syncleus/ferma/tx/TxAction.java index f946e58e..ed002512 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxAction.java +++ b/src/main/java/com/syncleus/ferma/tx/TxAction.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; @FunctionalInterface diff --git a/src/main/java/com/syncleus/ferma/tx/TxAction0.java b/src/main/java/com/syncleus/ferma/tx/TxAction0.java index e354e990..c8a2f85e 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxAction0.java +++ b/src/main/java/com/syncleus/ferma/tx/TxAction0.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; @FunctionalInterface diff --git a/src/main/java/com/syncleus/ferma/tx/TxAction1.java b/src/main/java/com/syncleus/ferma/tx/TxAction1.java index 75efc341..6d773507 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxAction1.java +++ b/src/main/java/com/syncleus/ferma/tx/TxAction1.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; @FunctionalInterface diff --git a/src/main/java/com/syncleus/ferma/tx/TxAction2.java b/src/main/java/com/syncleus/ferma/tx/TxAction2.java index c2afdf41..14d29312 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxAction2.java +++ b/src/main/java/com/syncleus/ferma/tx/TxAction2.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; @FunctionalInterface diff --git a/src/main/java/com/syncleus/ferma/tx/TxFactory.java b/src/main/java/com/syncleus/ferma/tx/TxFactory.java index b93809d0..286fc121 100644 --- a/src/main/java/com/syncleus/ferma/tx/TxFactory.java +++ b/src/main/java/com/syncleus/ferma/tx/TxFactory.java @@ -49,16 +49,18 @@ public interface TxFactory { /** * Create a new transaction. * - * @return + * @return new transaction. */ Tx createTx(); + /** - * Execute the txHandler within the scope of a transaction and call + * Execute the txHandler within the scope of a transaction and call * the result handler once the transaction handler code has finished. - * + * * @param txHandler * Handler that will be executed within the scope of the transaction. + * @param <T> Type of the object returned by the handler * @return Object which was returned by the handler */ <T> T tx(TxAction<T> txHandler); @@ -80,6 +82,7 @@ public interface TxFactory { * * @param txHandler * Handler that will be executed within the scope of the transaction. + * @param <T> type of the object returned by the handler. * @return Result of the handler */ default <T> T tx(TxAction1<T> txHandler) { diff --git a/src/main/java/com/syncleus/ferma/tx/WrappedFramedTxGraph.java b/src/main/java/com/syncleus/ferma/tx/WrappedFramedTxGraph.java index 384d01e9..ee31c736 100644 --- a/src/main/java/com/syncleus/ferma/tx/WrappedFramedTxGraph.java +++ b/src/main/java/com/syncleus/ferma/tx/WrappedFramedTxGraph.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; import org.apache.tinkerpop.gremlin.structure.Graph; diff --git a/src/test/java/com/syncleus/ferma/tx/DummyGraph.java b/src/test/java/com/syncleus/ferma/tx/DummyGraph.java index a14e3ea6..b1dc7673 100644 --- a/src/test/java/com/syncleus/ferma/tx/DummyGraph.java +++ b/src/test/java/com/syncleus/ferma/tx/DummyGraph.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; import org.apache.tinkerpop.gremlin.structure.Graph; diff --git a/src/test/java/com/syncleus/ferma/tx/DummyTransaction.java b/src/test/java/com/syncleus/ferma/tx/DummyTransaction.java index 4924d0be..d7fa735b 100644 --- a/src/test/java/com/syncleus/ferma/tx/DummyTransaction.java +++ b/src/test/java/com/syncleus/ferma/tx/DummyTransaction.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; import org.apache.tinkerpop.gremlin.structure.Graph; diff --git a/src/test/java/com/syncleus/ferma/tx/TxFactoryTest.java b/src/test/java/com/syncleus/ferma/tx/TxFactoryTest.java index d79f4611..018faf54 100644 --- a/src/test/java/com/syncleus/ferma/tx/TxFactoryTest.java +++ b/src/test/java/com/syncleus/ferma/tx/TxFactoryTest.java @@ -1,3 +1,18 @@ +/** + * Copyright 2004 - 2016 Syncleus, Inc. + * + * Licensed 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 com.syncleus.ferma.tx; import static org.junit.Assert.assertEquals; -- GitLab