Skip to content

Commit

Permalink
small update to deploy interface (finos#3403)
Browse files Browse the repository at this point in the history
  • Loading branch information
MauricioUyaguari authored Feb 10, 2025
1 parent b740a5d commit 9393b04
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import org.finos.legend.engine.shared.core.extension.LegendGenerationExtension;
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.PackageableElement;

import java.util.List;


public interface DeploymentConfigurationExtension extends LegendGenerationExtension
{
Expand All @@ -35,6 +37,25 @@ default String type()
*/
String getKey();

/**
* Gives the label for extension for user facing messaging
* if different from key
*
* @return string
*/
default String getLabel()
{
return this.getKey();
}

/**
* Gives supported classifier paths for extension
* important as used for filtering non-compiled elements
*
* @return List of classifier paths
*/
List<String> getSupportedClassifierPaths();


/**
* Determines whether a packageable element can deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

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

import org.eclipse.collections.api.factory.Lists;
import org.finos.legend.engine.deployment.model.DeploymentConfigurationExtension;
import org.finos.legend.engine.deployment.model.DeploymentResponse;
import org.finos.legend.engine.deployment.model.DeploymentStatus;
Expand All @@ -25,6 +26,8 @@
import org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.PackageableElement;
import org.slf4j.Logger;

import java.util.List;

import static org.finos.legend.engine.language.pure.compiler.toPureGraph.HelperModelBuilder.getElementFullPath;

public class ClassDeploymentExtension implements DeploymentConfigurationExtension
Expand All @@ -38,6 +41,8 @@ public String getKey()
return "classDeploymentTest";
}



@Override
public boolean canDeploy(PackageableElement element)
{
Expand All @@ -59,6 +64,12 @@ public DeploymentResponse validate(PackageableElement element, PureModel pureMod
return response;
}

@Override
public List<String> getSupportedClassifierPaths()
{
return Lists.mutable.with("meta::pure::metamodel::type::Class");
}


@Override
public DeploymentResponse deploy(PackageableElement element, PureModel pureModel, PureModelContextData data, String clientVersion)
Expand Down

0 comments on commit 9393b04

Please sign in to comment.