Skip to content

Commit

Permalink
Move Protocol files (#2450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasirmod17 authored Nov 10, 2023
1 parent b9a064b commit f5cfc42
Show file tree
Hide file tree
Showing 50 changed files with 192 additions and 103 deletions.
4 changes: 2 additions & 2 deletions legend-engine-config/legend-engine-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-snowflakeApp-generator</artifactId>
<artifactId>legend-engine-xt-snowflakeApp-protocol</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
Expand Down Expand Up @@ -376,7 +376,7 @@
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-hostedService-generation</artifactId>
<artifactId>legend-engine-xt-hostedService-protocol</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
import org.finos.legend.engine.functionActivator.api.FunctionActivatorAPI;
import org.finos.legend.engine.generation.artifact.api.ArtifactGenerationExtensionApi;
import org.finos.legend.engine.language.hostedService.api.HostedServiceService;
import org.finos.legend.engine.language.hostedService.generation.deployment.HostedServiceDeploymentConfiguration;
import org.finos.legend.engine.protocol.hostedService.deployment.HostedServiceDeploymentConfiguration;
import org.finos.legend.engine.language.pure.compiler.api.Compile;
import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel;
import org.finos.legend.engine.language.pure.grammar.api.grammarToJson.GrammarToJson;
Expand All @@ -99,7 +99,7 @@
import org.finos.legend.engine.language.pure.modelManager.sdlc.SDLCLoader;
import org.finos.legend.engine.language.pure.relational.api.relationalElement.RelationalElementAPI;
import org.finos.legend.engine.language.snowflakeApp.api.SnowflakeAppService;
import org.finos.legend.engine.language.snowflakeApp.generator.SnowflakeAppDeploymentConfiguration;
import org.finos.legend.engine.protocol.snowflakeApp.deployment.SnowflakeAppDeploymentConfiguration;
import org.finos.legend.engine.plan.execution.PlanExecutor;
import org.finos.legend.engine.plan.execution.api.ExecutePlanLegacy;
import org.finos.legend.engine.plan.execution.api.ExecutePlanStrategic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-functionActivator-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-functionActivator-protocol</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-protocol-pure</artifactId>
Expand All @@ -83,10 +87,6 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-bigquery-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-protocol</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.factory.Lists;
import org.finos.legend.engine.functionActivator.api.output.FunctionActivatorInfo;
import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionArtifact;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionContent;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionDeploymentConfiguration;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionDeploymentResult;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.functionActivator.service.FunctionActivatorError;
import org.finos.legend.engine.functionActivator.service.FunctionActivatorService;
import org.finos.legend.engine.language.bigqueryFunction.deployment.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@
import com.google.cloud.bigquery.RoutineId;
import com.google.cloud.bigquery.RoutineInfo;
import org.eclipse.collections.api.factory.Lists;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.utility.Iterate;
import org.finos.legend.engine.functionActivator.deployment.DeploymentManager;
import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorArtifact;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionArtifact;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionContent;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionDeploymentConfiguration;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionDeploymentResult;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact;
import org.finos.legend.engine.shared.core.identity.Identity;
import org.finos.legend.pure.generated.Root_meta_external_function_activator_bigQueryFunction_BigQueryFunctionDeploymentConfiguration;
import org.finos.legend.pure.generated.Root_meta_pure_alloy_connections_alloy_specification_BigQueryDatasourceSpecification;
import org.pac4j.core.profile.CommonProfile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel;
import org.finos.legend.engine.plan.generation.PlanGenerator;
import org.finos.legend.engine.plan.platform.PlanPlatform;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionArtifact;
import org.finos.legend.pure.generated.*;
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.FunctionDefinition;
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.PackageableFunction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-protocol</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.language.bigqueryFunction.deployment;
package org.finos.legend.engine.protocol.bigqueryFunction.deployment;

import org.eclipse.collections.api.list.MutableList;
import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorArtifact;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact;

public class BigQueryFunctionArtifact extends FunctionActivatorArtifact
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.language.bigqueryFunction.deployment;
package org.finos.legend.engine.protocol.bigqueryFunction.deployment;

import org.eclipse.collections.api.list.MutableList;
import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorDeploymentContent;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentContent;

public class BigQueryFunctionContent extends FunctionActivatorDeploymentContent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.language.bigqueryFunction.deployment;
package org.finos.legend.engine.protocol.bigqueryFunction.deployment;

import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.RelationalDatabaseConnection;

public class BigQueryFunctionDeploymentConfiguration extends FunctionActivatorDeploymentConfiguration
{
RelationalDatabaseConnection connection;

public BigQueryFunctionDeploymentConfiguration()
{
//jackson
}

public BigQueryFunctionDeploymentConfiguration(RelationalDatabaseConnection connection)
{
this.connection = connection;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.language.bigqueryFunction.deployment;
package org.finos.legend.engine.protocol.bigqueryFunction.deployment;

import org.eclipse.collections.api.list.MutableList;
import org.finos.legend.engine.functionActivator.deployment.DeploymentResult;
import org.finos.legend.engine.protocol.functionActivator.deployment.DeploymentResult;

public class BigQueryFunctionDeploymentResult extends DeploymentResult
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
import org.eclipse.collections.api.block.function.Function0;
import org.eclipse.collections.api.factory.Lists;
import org.eclipse.collections.api.factory.Maps;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionArtifact;
import org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionContent;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentContent;
import org.finos.legend.engine.protocol.pure.v1.extension.ProtocolSubTypeInfo;
import org.finos.legend.engine.protocol.pure.v1.extension.PureProtocolExtension;
import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.PackageableElement;
Expand All @@ -37,6 +42,15 @@ public List<Function0<List<ProtocolSubTypeInfo<?>>>> getExtraProtocolSubTypeInfo
.build(),
ProtocolSubTypeInfo.newBuilder(PackageableElement.class)
.withSubtype(BigQueryFunctionDeploymentConfiguration.class, packageJSONType + "Config")
.build(),
ProtocolSubTypeInfo.newBuilder(FunctionActivatorDeploymentConfiguration.class)
.withSubtype(org.finos.legend.engine.protocol.bigqueryFunction.deployment.BigQueryFunctionDeploymentConfiguration.class, "bigQueryFunctionDeploymentConfig")
.build(),
ProtocolSubTypeInfo.newBuilder(FunctionActivatorArtifact.class)
.withSubtype(BigQueryFunctionArtifact.class, "bigQueryFunctionArtifact")
.build(),
ProtocolSubTypeInfo.newBuilder(FunctionActivatorDeploymentContent.class)
.withSubtype(BigQueryFunctionContent.class, "bigQueryFunctionDeploymentContent")
.build()
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-functionActivator-protocol</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-functionActivator-deployment</artifactId>
</dependency>

<!-- TEST -->
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
import org.eclipse.collections.api.list.MutableList;
import org.finos.legend.engine.functionActivator.api.input.FunctionActivatorInput;
import org.finos.legend.engine.functionActivator.api.output.FunctionActivatorInfo;
import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.functionActivator.service.FunctionActivatorLoader;
import org.finos.legend.engine.functionActivator.service.FunctionActivatorService;
import org.finos.legend.engine.language.pure.compiler.Compiler;
import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel;
import org.finos.legend.engine.language.pure.modelManager.ModelManager;
//import org.finos.legend.engine.protocol.functionActivator.metamodel.DeploymentConfiguration;
import org.finos.legend.engine.functionActivator.deployment.DeploymentResult;
import org.finos.legend.engine.protocol.functionActivator.deployment.DeploymentResult;
import org.finos.legend.engine.protocol.pure.PureClientVersions;
import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContextData;
import org.finos.legend.engine.shared.core.ObjectMapperFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.finos.legend.engine.functionActivator.api.output.FunctionActivatorInfo;
import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorArtifact;
import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel;
import org.finos.legend.engine.protocol.functionActivator.metamodel.DeploymentConfiguration;
import org.finos.legend.engine.functionActivator.deployment.DeploymentResult;
import org.finos.legend.engine.protocol.functionActivator.deployment.DeploymentResult;
import org.finos.legend.engine.protocol.pure.v1.model.context.PureModelContext;
import org.finos.legend.engine.shared.core.identity.Identity;
import org.finos.legend.pure.generated.Root_meta_external_function_activator_FunctionActivator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-functionActivator-protocol</artifactId>
</dependency>

<!-- TEST -->
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

package org.finos.legend.engine.functionActivator.deployment;

import org.finos.legend.engine.protocol.functionActivator.deployment.DeploymentResult;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorArtifact;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.shared.core.identity.Identity;

import java.util.List;
Expand All @@ -25,6 +28,5 @@ public interface DeploymentManager<U extends FunctionActivatorArtifact, V extend

public V deploy(Identity identity, U artifact, List<W> availableRuntimeConfigurations);


public boolean canDeploy(FunctionActivatorArtifact activatorArtifact);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.functionActivator.deployment;
package org.finos.legend.engine.protocol.functionActivator.deployment;

public class DeploymentResult
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.functionActivator.deployment;
package org.finos.legend.engine.protocol.functionActivator.deployment;

public class FunctionActivatorArtifact
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.functionActivator.deployment;
package org.finos.legend.engine.protocol.functionActivator.deployment;

public class FunctionActivatorDeploymentConfiguration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.functionActivator.deployment;
package org.finos.legend.engine.protocol.functionActivator.deployment;

public class FunctionActivatorDeploymentContent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-functionActivator-deployment</artifactId>
<artifactId>legend-engine-protocol-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-protocol-pure</artifactId>
<artifactId>legend-engine-xt-functionActivator-api</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-functionActivator-api</artifactId>
<artifactId>legend-engine-xt-functionActivator-protocol</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.factory.Lists;
import org.finos.legend.engine.functionActivator.api.output.FunctionActivatorInfo;
import org.finos.legend.engine.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.language.hostedService.generation.deployment.HostedServiceArtifact;
import org.finos.legend.engine.language.hostedService.generation.deployment.HostedServiceDeploymentConfiguration;
import org.finos.legend.engine.language.hostedService.generation.model.GenerationInfoData;
import org.finos.legend.engine.protocol.functionActivator.deployment.FunctionActivatorDeploymentConfiguration;
import org.finos.legend.engine.protocol.hostedService.deployment.HostedServiceArtifact;
import org.finos.legend.engine.protocol.hostedService.deployment.HostedServiceDeploymentConfiguration;
import org.finos.legend.engine.functionActivator.service.FunctionActivatorError;
import org.finos.legend.engine.functionActivator.service.FunctionActivatorService;
import org.finos.legend.engine.language.hostedService.generation.deployment.HostedServiceDeploymentManager;
import org.finos.legend.engine.protocol.hostedService.deployment.model.GenerationInfoData;
import org.finos.legend.engine.protocol.hostedService.metamodel.HostedService;
//import org.finos.legend.engine.protocol.hostedService.metamodel.HostedServiceDeploymentConfiguration;
import org.finos.legend.engine.language.hostedService.generation.deployment.HostedServiceDeploymentResult;
import org.finos.legend.engine.protocol.hostedService.deployment.HostedServiceDeploymentResult;
import org.finos.legend.engine.language.hostedService.generation.HostedServiceArtifactGenerator;
import org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel;
import org.finos.legend.engine.protocol.hostedService.metamodel.HostedServiceProtocolExtension;
Expand Down
Loading

0 comments on commit f5cfc42

Please sign in to comment.