generated from finos/software-project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support unknown post deployment properties
- Loading branch information
1 parent
9f5d3fd
commit 138fb26
Showing
11 changed files
with
216 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
'@finos/legend-graph': patch | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...aph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_LegendLambdaHelper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* Copyright (c) 2020-present, Goldman Sachs | ||
* | ||
* 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. | ||
*/ | ||
|
||
import { PostDeploymentAction } from '../../../../../../../../graph/metamodel/pure/functionActivator/PostDeploymentAction.js'; | ||
import { | ||
INTERNAL__UnknownPostDeploymentProperties, | ||
type PostDeploymentProperties, | ||
} from '../../../../../../../../graph/metamodel/pure/functionActivator/PostDeploymentProperties.js'; | ||
import type { FunctionActivator } from '../../../../../../../../graph/metamodel/pure/packageableElements/function/FunctionActivator.js'; | ||
import type { V1_PostDeploymentAction } from '../../../../engine/functionActivator/V1_PostDeploymentAction.js'; | ||
import { | ||
V1_INTERNAL__UnknownPostDeploymentProperties, | ||
V1_PostDeploymentProperties, | ||
} from '../../../../engine/functionActivator/V1_PostDeploymentProperties.js'; | ||
import type { V1_FunctionActivator } from '../../../../model/packageableElements/function/V1_FunctionActivator.js'; | ||
|
||
export const V1_buildPostDeploymentProperties = ( | ||
protocol: V1_PostDeploymentProperties, | ||
): PostDeploymentProperties => { | ||
if (protocol instanceof V1_INTERNAL__UnknownPostDeploymentProperties) { | ||
const metamodel = new INTERNAL__UnknownPostDeploymentProperties(); | ||
metamodel.content = protocol.content; | ||
return metamodel; | ||
} | ||
return new V1_PostDeploymentProperties(); | ||
}; | ||
|
||
export const V1_buildPostDeploymentActions = ( | ||
protocol: V1_PostDeploymentAction, | ||
): PostDeploymentAction => { | ||
const val = new PostDeploymentAction(); | ||
val.automated = protocol.automated; | ||
if (protocol.properties) { | ||
val.properties = V1_buildPostDeploymentProperties(protocol.properties); | ||
} | ||
return val; | ||
}; | ||
|
||
export const V1_buildFunctionActivatorActions = ( | ||
protocl: V1_FunctionActivator, | ||
metamodel: FunctionActivator, | ||
): void => { | ||
metamodel.actions = protocl.actions.map(V1_buildPostDeploymentActions); | ||
}; |
59 changes: 59 additions & 0 deletions
59
.../protocol/pure/v1/transformation/pureGraph/to/helpers/V1_LegendLambdaTransformerHelper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* Copyright (c) 2020-present, Goldman Sachs | ||
* | ||
* 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. | ||
*/ | ||
|
||
import type { PostDeploymentAction } from '../../../../../../../../graph/metamodel/pure/functionActivator/PostDeploymentAction.js'; | ||
import { | ||
INTERNAL__UnknownPostDeploymentProperties, | ||
type PostDeploymentProperties, | ||
} from '../../../../../../../../graph/metamodel/pure/functionActivator/PostDeploymentProperties.js'; | ||
import type { FunctionActivator } from '../../../../../../../../graph/metamodel/pure/packageableElements/function/FunctionActivator.js'; | ||
import { V1_PostDeploymentAction } from '../../../../engine/functionActivator/V1_PostDeploymentAction.js'; | ||
import { | ||
V1_INTERNAL__UnknownPostDeploymentProperties, | ||
V1_PostDeploymentProperties, | ||
} from '../../../../engine/functionActivator/V1_PostDeploymentProperties.js'; | ||
import type { V1_FunctionActivator } from '../../../../model/packageableElements/function/V1_FunctionActivator.js'; | ||
|
||
export const V1_transformPostDeploymentProperties = ( | ||
protocol: PostDeploymentProperties, | ||
): V1_PostDeploymentProperties => { | ||
if (protocol instanceof INTERNAL__UnknownPostDeploymentProperties) { | ||
const metamodel = new V1_INTERNAL__UnknownPostDeploymentProperties(); | ||
metamodel.content = protocol.content; | ||
return metamodel; | ||
} | ||
return new V1_PostDeploymentProperties(); | ||
}; | ||
|
||
export const V1_tansformPostDeploymentActions = ( | ||
metamodel: PostDeploymentAction, | ||
): V1_PostDeploymentAction => { | ||
const protocol = new V1_PostDeploymentAction(); | ||
protocol.automated = metamodel.automated; | ||
if (metamodel.properties) { | ||
protocol.properties = V1_transformPostDeploymentProperties( | ||
metamodel.properties, | ||
); | ||
} | ||
return protocol; | ||
}; | ||
|
||
export const V1_transformFunctionActivatorActions = ( | ||
protocol: V1_FunctionActivator, | ||
metamodel: FunctionActivator, | ||
): void => { | ||
protocol.actions = metamodel.actions.map(V1_tansformPostDeploymentActions); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters