You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2018/06/25 22:07:09 UTC
[trafficcontrol] 10/12: Added Apache License to all Java API Files
This is an automated email from the ASF dual-hosted git repository.
neuman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 7bf3c5195993b863ef2473048046f4b9b0d21cda
Author: nerdynick <ne...@gmail.com>
AuthorDate: Thu May 24 09:30:42 2018 -0600
Added Apache License to all Java API Files
---
traffic_control/clients/java/CONTRIBUTE.md | 19 +++++++++++++++++++
traffic_control/clients/java/README.md | 19 +++++++++++++++++++
traffic_control/clients/java/common/pom.xml | 19 +++++++++++++++++++
.../comcast/cdn/traffic_control/RestApiSession.java | 15 +++++++++++++++
.../exception/InvalidJsonException.java | 15 +++++++++++++++
.../traffic_control/exception/LoginException.java | 15 +++++++++++++++
.../exception/OperationException.java | 15 +++++++++++++++
.../exception/TrafficControlException.java | 15 +++++++++++++++
traffic_control/clients/java/pom.xml | 19 +++++++++++++++++++
traffic_control/clients/java/trafficops/README.md | 21 +++++++++++++++++++++
traffic_control/clients/java/trafficops/pom.xml | 19 +++++++++++++++++++
.../comcast/cdn/traffic_control/ResponseFuture.java | 15 +++++++++++++++
.../com/comcast/cdn/traffic_control/TOSession.java | 15 +++++++++++++++
.../comcast/cdn/traffic_control/models/Alert.java | 15 +++++++++++++++
.../cdn/traffic_control/models/Response.java | 15 +++++++++++++++
.../comcast/cdn/traffic_control/TOSessionTest.java | 15 +++++++++++++++
.../trafficops/src/test/resources/logback-test.xml | 19 ++++++++++++++++++-
17 files changed, 284 insertions(+), 1 deletion(-)
diff --git a/traffic_control/clients/java/CONTRIBUTE.md b/traffic_control/clients/java/CONTRIBUTE.md
index 0c53ef7..563d34d 100644
--- a/traffic_control/clients/java/CONTRIBUTE.md
+++ b/traffic_control/clients/java/CONTRIBUTE.md
@@ -1,3 +1,22 @@
+<!--
+ 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.
+-->
+
# IDE Setup
Most all of the code contained uses Builders for implementation. This ensures all properties are managed and defaults are used. As well as facilitate YAML based construction.
diff --git a/traffic_control/clients/java/README.md b/traffic_control/clients/java/README.md
index 43d9592..013ae5b 100644
--- a/traffic_control/clients/java/README.md
+++ b/traffic_control/clients/java/README.md
@@ -1,3 +1,22 @@
+<!--
+ 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.
+-->
+
# Java API Framework
Simple framework for Rest based API communication.
diff --git a/traffic_control/clients/java/common/pom.xml b/traffic_control/clients/java/common/pom.xml
index 9c40861..f1f208f 100644
--- a/traffic_control/clients/java/common/pom.xml
+++ b/traffic_control/clients/java/common/pom.xml
@@ -1,3 +1,22 @@
+<!--
+ 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.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
diff --git a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/RestApiSession.java b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/RestApiSession.java
index c6bc632..d85af05 100644
--- a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/RestApiSession.java
+++ b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/RestApiSession.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control;
import java.io.Closeable;
diff --git a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/InvalidJsonException.java b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/InvalidJsonException.java
index 696574b..568f091 100644
--- a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/InvalidJsonException.java
+++ b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/InvalidJsonException.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control.exception;
public class InvalidJsonException extends TrafficControlException {
diff --git a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/LoginException.java b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/LoginException.java
index 83fcdc6..d81b8b6 100644
--- a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/LoginException.java
+++ b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/LoginException.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control.exception;
public class LoginException extends TrafficControlException {
diff --git a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/OperationException.java b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/OperationException.java
index 1a019fa..fca9480 100644
--- a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/OperationException.java
+++ b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/OperationException.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control.exception;
public class OperationException extends TrafficControlException {
diff --git a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/TrafficControlException.java b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/TrafficControlException.java
index 617db9d..69cfc62 100644
--- a/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/TrafficControlException.java
+++ b/traffic_control/clients/java/common/src/main/java/com/comcast/cdn/traffic_control/exception/TrafficControlException.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control.exception;
public class TrafficControlException extends Exception {
diff --git a/traffic_control/clients/java/pom.xml b/traffic_control/clients/java/pom.xml
index c921a8e..18eb1af 100644
--- a/traffic_control/clients/java/pom.xml
+++ b/traffic_control/clients/java/pom.xml
@@ -1,3 +1,22 @@
+<!--
+ 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.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
diff --git a/traffic_control/clients/java/trafficops/README.md b/traffic_control/clients/java/trafficops/README.md
index cb784c5..9bd3e0d 100644
--- a/traffic_control/clients/java/trafficops/README.md
+++ b/traffic_control/clients/java/trafficops/README.md
@@ -1,3 +1,22 @@
+<!--
+ 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.
+-->
+
# TrafficOps Api Client
Simple Java API client for communicating with the TrafficOps API
@@ -13,6 +32,7 @@ Simple Java API client for communicating with the TrafficOps API
final URI trafficOpsUri = new URI("https://trafficops.mycdn.com:443");
final TOSession.Builder toSessionBuilder = TOSession.builder()
.fromURI(trafficOpsUri);
+final RestApiSession.Builder restSession = toSessionBuilder.restClientBuilder();
final TOSession toSession = toSessionBuilder.build();
```
**Explicitly set properties**
@@ -24,6 +44,7 @@ final TOSession.Builder toSessionBuilder = TOSession.builder()
.setHost("trafficops.mycdn.com")
.setPort(443)
.setSsl(true);
+final RestApiSession.Builder restSession = toSessionBuilder.restClientBuilder();
final TOSession toSession = toSessionBuilder.build();
```
diff --git a/traffic_control/clients/java/trafficops/pom.xml b/traffic_control/clients/java/trafficops/pom.xml
index 2c3a5b3..56f350a 100644
--- a/traffic_control/clients/java/trafficops/pom.xml
+++ b/traffic_control/clients/java/trafficops/pom.xml
@@ -1,3 +1,22 @@
+<!--
+ 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.
+-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
diff --git a/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/ResponseFuture.java b/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/ResponseFuture.java
index af2b655..8a2af1c 100644
--- a/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/ResponseFuture.java
+++ b/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/ResponseFuture.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control;
import java.io.IOException;
diff --git a/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/TOSession.java b/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/TOSession.java
index 081ce13..1f6c9a8 100644
--- a/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/TOSession.java
+++ b/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/TOSession.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control;
import java.io.Closeable;
diff --git a/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/models/Alert.java b/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/models/Alert.java
index 0a6e2f9..bb5bd83 100644
--- a/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/models/Alert.java
+++ b/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/models/Alert.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control.models;
public class Alert {
diff --git a/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/models/Response.java b/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/models/Response.java
index ef7b50b..ad039cd 100644
--- a/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/models/Response.java
+++ b/traffic_control/clients/java/trafficops/src/main/java/com/comcast/cdn/traffic_control/models/Response.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control.models;
import java.util.List;
diff --git a/traffic_control/clients/java/trafficops/src/test/java/com/comcast/cdn/traffic_control/TOSessionTest.java b/traffic_control/clients/java/trafficops/src/test/java/com/comcast/cdn/traffic_control/TOSessionTest.java
index 3cf550b..e1e2f06 100644
--- a/traffic_control/clients/java/trafficops/src/test/java/com/comcast/cdn/traffic_control/TOSessionTest.java
+++ b/traffic_control/clients/java/trafficops/src/test/java/com/comcast/cdn/traffic_control/TOSessionTest.java
@@ -1,3 +1,18 @@
+/*
+ *
+ * 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.comcast.cdn.traffic_control;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
diff --git a/traffic_control/clients/java/trafficops/src/test/resources/logback-test.xml b/traffic_control/clients/java/trafficops/src/test/resources/logback-test.xml
index 185b678..cca2d34 100644
--- a/traffic_control/clients/java/trafficops/src/test/resources/logback-test.xml
+++ b/traffic_control/clients/java/trafficops/src/test/resources/logback-test.xml
@@ -1,4 +1,21 @@
-<?xml version="1.0"?>
+<!--
+ 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.
+-->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>