From e4f559a48e8aaa168c815b742632f5f3f97cfeb4 Mon Sep 17 00:00:00 2001
From: ZMai <zmai@slb.com>
Date: Mon, 20 Feb 2023 21:36:19 -0600
Subject: [PATCH] Add Copyright statement

---
 .../osdu/indexer/api/IndexProvisionApi.java     | 17 ++++++++++++++++-
 .../osdu/indexer/model/IndexAliasesResult.java  | 15 +++++++++++++++
 .../osdu/indexer/service/IndexAliasService.java | 15 +++++++++++++++
 .../indexer/service/IndexAliasServiceImpl.java  | 15 +++++++++++++++
 4 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/api/IndexProvisionApi.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/api/IndexProvisionApi.java
index 001ce8669..f17b8810b 100644
--- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/api/IndexProvisionApi.java
+++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/api/IndexProvisionApi.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright © Schlumberger
+ *
+ * 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
+ *
+ *      https://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.opengroup.osdu.indexer.api;
 
 import org.opengroup.osdu.core.common.model.search.SearchServiceRole;
@@ -18,7 +33,7 @@ public class IndexProvisionApi {
     @Inject
     private IndexAliasService indexAliasService;
 
-    //@PreAuthorize("@authorizationFilter.hasPermission('" + SearchServiceRole.ADMIN + "')")
+    @PreAuthorize("@authorizationFilter.hasPermission('" + SearchServiceRole.ADMIN + "')")
     @PostMapping(path = "/aliases")
     public ResponseEntity<IndexAliasesResult> createIndexAliases()  {
        return new ResponseEntity<>(indexAliasService.createIndexAliasesForAll(), HttpStatus.OK);
diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/IndexAliasesResult.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/IndexAliasesResult.java
index c10a50f7b..c53f64d4c 100644
--- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/IndexAliasesResult.java
+++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/model/IndexAliasesResult.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright © Schlumberger
+ *
+ * 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
+ *
+ *      https://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.opengroup.osdu.indexer.model;
 
 import com.fasterxml.jackson.annotation.JsonInclude;
diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasService.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasService.java
index bc3947da9..a817d979f 100644
--- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasService.java
+++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasService.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright © Schlumberger
+ *
+ * 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
+ *
+ *      https://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.opengroup.osdu.indexer.service;
 
 import org.elasticsearch.client.RestHighLevelClient;
diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasServiceImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasServiceImpl.java
index eb3f96ec5..e09e98bce 100644
--- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasServiceImpl.java
+++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexAliasServiceImpl.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright © Schlumberger
+ *
+ * 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
+ *
+ *      https://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.opengroup.osdu.indexer.service;
 
 import com.google.api.client.util.Strings;
-- 
GitLab