Skip to content
Snippets Groups Projects
Commit d62083bc authored by Jagan Gottimukkula's avatar Jagan Gottimukkula
Browse files

* Fixed the package name in azure

* Fixed the schema file dependency from core
* Updated the spring boot applications for gcp and azure
parent b4d3d0d7
No related branches found
No related tags found
1 merge request!6Trusted ibm
Showing
with 142 additions and 15 deletions
......@@ -63,7 +63,7 @@
<configuration>
<classifier>spring-boot</classifier>
<mainClass>
org.opendes.indexer.IndexerAzureApplication
org.opendes.indexer.azure.IndexerAzureApplication
</mainClass>
</configuration>
</execution>
......
package org.opendes.indexer.azure;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class IndexerAzureApplication {
public static void main(String[] args) {
SpringApplication.run(IndexerAzureApplication.class, args);
}
}
package org.opendes.indexer.azure.util.di;
package org.opendes.indexer.azure.di;
import org.opendes.client.api.entitlements.IEntitlementsFactory;
import org.springframework.beans.factory.config.AbstractFactoryBean;
......
package org.opendes.indexer.azure.util.di;
package org.opendes.indexer.azure.di;
import org.opendes.client.api.DpsHeaders;
import org.opendes.client.api.entitlements.IEntitlementsFactory;
......
package org.opendes.indexer.azure.util.di;
package org.opendes.indexer.azure.di;
import com.microsoft.azure.spring.autoconfigure.aad.UserPrincipal;
import org.apache.http.HttpStatus;
......
package org.opendes.indexer.azure.util.di;
package org.opendes.indexer.azure.di;
import org.opendes.client.cache.ICache;
import org.opendes.client.multitenancy.ITenantFactory;
......
package org.opendes.indexer.azure.util.kms;
package org.opendes.indexer.azure.kms;
import org.opendes.core.kms.IKmsClient;
......
// Copyright 2017-2019, 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
//
// 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.opendes.indexer.azure.model;
public interface ISchemaRepository {
String SCHEMA_KIND = "IndexerSchema";
String SCHEMA = "schema";
String USER = "user";
String EXTENSION = "extension";
void add(Schema schema, String user);
Schema get(String kind);
}
// Copyright 2017-2019, 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
//
// 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.opendes.indexer.azure.model;
import java.util.Map;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import io.swagger.annotations.ApiModelProperty;
import org.opendes.indexer.SwaggerDoc;
import org.opendes.core.validation.ValidKind;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Schema {
@ValidKind
@NotNull
@ApiModelProperty(value = SwaggerDoc.SCHEMA_REQUEST_KIND,
required = true,
example = SwaggerDoc.RECORD_KIND_EXAMPLE)
private String kind;
@Valid
private SchemaItem[] schema;
private Map<String, Object> ext;
}
\ No newline at end of file
// Copyright 2017-2019, 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
//
// 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.opendes.indexer.azure.model;
import java.util.Map;
import javax.validation.constraints.NotEmpty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SchemaItem {
@NotEmpty
private String path;
@NotEmpty
private String kind;
@JsonInclude(value = Include.NON_NULL)
private Map<String, Object> ext;
}
package org.opendes.indexer.azure.util.persistence;
package org.opendes.indexer.azure.persistence;
import org.opendes.client.multitenancy.TenantInfo;
import org.opendes.core.model.ClusterSettings;
......
package org.opendes.indexer.azure.util.persistence;
package org.opendes.indexer.azure.persistence;
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.Document;
import com.microsoft.azure.spring.data.cosmosdb.core.mapping.PartitionKey;
......@@ -6,9 +6,9 @@ import com.microsoft.azure.spring.data.cosmosdb.repository.DocumentDbRepository;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.opendes.core.model.Schema;
import org.opendes.core.model.SchemaItem;
import org.opendes.core.service.ISchemaRepository;
import org.opendes.indexer.azure.model.Schema;
import org.opendes.indexer.azure.model.SchemaItem;
import org.opendes.indexer.azure.model.ISchemaRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Id;
import org.springframework.stereotype.Repository;
......
package org.opendes.indexer.azure.util.util;
package org.opendes.indexer.azure.util;
import com.google.common.base.Strings;
import org.apache.http.HttpStatus;
......
package org.opendes.indexer.azure.util.util;
package org.opendes.indexer.azure.util;
import org.opendes.core.util.IServiceAccountJwtClient;
import org.springframework.stereotype.Component;
......
......@@ -121,7 +121,7 @@
<configuration>
<classifier>spring-boot</classifier>
<mainClass>
org.opendes.indexer.IndexerGcpApplication
org.opendes.indexer.gcp.IndexerGcpApplication
</mainClass>
</configuration>
</execution>
......
package org.opendes.indexer.gcp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
......@@ -8,4 +10,4 @@ public class IndexerGcpApplication {
SpringApplication.run(IndexerGcpApplication.class, args);
}
}
\ No newline at end of file
}
......@@ -145,4 +145,8 @@ public final class SwaggerDoc {
// REQUEST VALIDATION
public static final String REQUEST_VALIDATION_NOT_NULL_BODY = "Request body can not be null";
// Azure Schema Request
public static final String SCHEMA_REQUEST_KIND = "Record kind for which the schema information is applied to.";
public static final String RECORD_KIND_EXAMPLE = "common:welldb:wellbore:1.0.0";
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment