summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java92
1 files changed, 0 insertions, 92 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java
deleted file mode 100644
index 52dcce9e2e..0000000000
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InformationDeployedArtifactsBusinessLogic.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.be.components.impl;
-
-//Pavel
-//currently NOT IN USE - there are no informational deployed artifacts after US601880
-
-@org.springframework.stereotype.Component("informationDeployedArtifactsBusinessLogic")
-public class InformationDeployedArtifactsBusinessLogic {
-
- /*
- * private static Logger log = LoggerFactory.getLogger(InformationDeployedArtifactsBusinessLogic.class. getName());
- *
- * @javax.annotation.Resource private ArtifactsBusinessLogic artifactBusinessLogic;
- *
- * public boolean isInformationDeployedArtifact(ArtifactDefinition artifactInfo) { log.debug("checking if artifact {} is informationalDeployable", artifactInfo.getArtifactName()); boolean informationDeployedArtifact = false; Map<String,
- * DeploymentArtifactTypeConfig> resourceInformationalDeployedArtifacts = ConfigurationManager.getConfigurationManager().getConfiguration() .getResourceInformationalDeployedArtifacts(); if( resourceInformationalDeployedArtifacts != null &&
- * resourceInformationalDeployedArtifacts.containsKey(artifactInfo. getArtifactType())){ if( artifactInfo.getArtifactGroupType() == ArtifactGroupTypeEnum.INFORMATIONAL && artifactInfo.checkEsIdExist()){ informationDeployedArtifact = true;
- *
- * } } String message = (informationDeployedArtifact) ? "artifact {} is informationalDeployable" : "artifact {} is not informationalDeployable"; log.debug(message, artifactInfo.getArtifactName()); return informationDeployedArtifact; }
- *
- * public Either<Boolean, ResponseFormat> validateArtifact(boolean isCreate, ArtifactDefinition artifactInfo, Component parent, NodeTypeEnum parentType) {
- *
- * log.debug("checking if informationalDeployable artifact {} is valid ", artifactInfo.getArtifactName()); Wrapper<ResponseFormat> responseFormatWrapper = new Wrapper<ResponseFormat>(); Map<String, DeploymentArtifactTypeConfig>
- * resourceInformationalDeployedArtifacts = ConfigurationManager.getConfigurationManager().getConfiguration(). getResourceInformationalDeployedArtifacts();
- *
- *
- * artifactBusinessLogic.validateArtifactTypeExists(responseFormatWrapper, artifactInfo); if( responseFormatWrapper.isEmpty() && isCreate ){ artifactBusinessLogic.validateSingleArtifactType(responseFormatWrapper,
- * ArtifactTypeEnum.findType(artifactInfo.getArtifactType()), parent, parentType); } if( responseFormatWrapper.isEmpty() ){ ArtifactTypeEnum artifactType = ArtifactTypeEnum.findType(artifactInfo.getArtifactType());
- * artifactBusinessLogic.validateFileExtension(responseFormatWrapper, () -> resourceInformationalDeployedArtifacts.get(artifactInfo.getArtifactType() ), artifactInfo, parentType, artifactType); }
- *
- * if( responseFormatWrapper.isEmpty() ){ validatePayloadContent(responseFormatWrapper, artifactInfo); }
- *
- * Either<Boolean, ResponseFormat> response; if( responseFormatWrapper.isEmpty() ){ response = Either.left(true); } else{ response = Either.right(responseFormatWrapper.getInnerElement()); }
- *
- * String message = (response.isLeft()) ? "informationalDeployable artifact {} is valid" : "informationalDeployable artifact {} is not valid"; log.debug(message, artifactInfo.getArtifactName()); return response; }
- *
- * private void validatePayloadContent(Wrapper<ResponseFormat> responseFormatWrapper, ArtifactDefinition artifactToVerify) { ArtifactTypeEnum artifactType = ArtifactTypeEnum.findType(artifactToVerify.getArtifactType()); if( artifactType ==
- * ArtifactTypeEnum.YANG_XML ){ String rawPayloadData = artifactToVerify.getPayloadData(); String xmlToParse = new String(org.apache.commons.codec.binary.Base64.decodeBase64(rawPayloadData ));
- *
- * boolean isXmlValid = artifactBusinessLogic.isValidXml(xmlToParse.getBytes()); if( !isXmlValid ){ ResponseFormat responseFormat = ResponseFormatManager.getInstance().getResponseFormat(ActionStatus. INVALID_XML,
- * artifactToVerify.getArtifactType()); responseFormatWrapper.setInnerElement(responseFormat); log.debug("Xml is not valid for artifact : {}", artifactToVerify.getArtifactName()); } } }
- *
- *
- *
- *
- * public List<ArtifactDefinition> getInformationalDeployedArtifactsForResourceInstance( ComponentInstance resourceInstance ) { String resourceUid = resourceInstance.getComponentUid(); String resourceName = resourceInstance.getComponentName();
- * return getInformationalDeployedArtifactsForResource(resourceUid, resourceName); }
- *
- * private List<ArtifactDefinition> getInformationalDeployedArtifactsForResource( String resourceUid, String resourceName) { List<ArtifactDefinition> informationalDeployedArtifacts = new ArrayList<ArtifactDefinition>(); log.
- * debug("checking if informationalDeployable artifacts exist for resource {} " , resourceName); Map<String, DeploymentArtifactTypeConfig> resourceInformationalDeployedArtifacts = ConfigurationManager.getConfigurationManager().getConfiguration()
- * .getResourceInformationalDeployedArtifacts();
- *
- *
- * Either<Map<String, ArtifactDefinition>, StorageOperationStatus> eitherArtifacts = artifactBusinessLogic.getArtifacts(resourceUid, NodeTypeEnum.Resource, false, ArtifactGroupTypeEnum.INFORMATIONAL);
- *
- * if( eitherArtifacts.isLeft() && resourceInformationalDeployedArtifacts != null ){ Predicate<ArtifactDefinition> predicate = p -> resourceInformationalDeployedArtifacts.containsKey(p.getArtifactType()) && p.checkEsIdExist() &&
- * p.getArtifactGroupType() == ArtifactGroupTypeEnum.INFORMATIONAL; informationalDeployedArtifacts = eitherArtifacts.left().value().values().stream().filter( predicate ).collect(Collectors.toList()); }
- *
- * if( informationalDeployedArtifacts.isEmpty() ){ log.debug("no informationalDeployable artifacts exist for resource {} ", resourceName); } else{ log. debug("informationalDeployable artifacts found for resource {} are :{}", resourceName,
- * informationalDeployedArtifacts.toString()); }
- *
- *
- * return informationalDeployedArtifacts; }
- *
- * public List<ArtifactDefinition> getAllDeployableArtifacts( Resource resource ){ List<ArtifactDefinition> merged = new ArrayList<ArtifactDefinition>();
- *
- * List<ArtifactDefinition> deploymentArtifacts = artifactBusinessLogic.getDeploymentArtifacts(resource, NodeTypeEnum.Resource); merged.addAll(deploymentArtifacts);
- *
- * List<ArtifactDefinition> informationalDeployedArtifactsForResource = getInformationalDeployedArtifactsForResource( resource.getUniqueId(), resource.getName()); merged.addAll(informationalDeployedArtifactsForResource);
- *
- * return merged; }
- */
-}
{ color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <artifactId>onboarding-fe</artifactId>
  <name>onboarding-ui-war</name>
  <packaging>war</packaging>

  <parent>
    <groupId>org.openecomp.sdc</groupId>
    <artifactId>sdc-onboarding</artifactId>
    <version>1.7.1-SNAPSHOT</version>
    <relativePath>../onboarding</relativePath>
  </parent>

  <properties>
    <maven.war.plugin.version>3.0.0</maven.war.plugin.version>
    <app.context.path>onboarding</app.context.path>
    <jest.command/>
  </properties>

  <!-- ============================================= -->
  <!-- Profile for windows to run jest one by the other due to current defect in node-graceful-js creating race condition -->
  <!-- https://github.com/isaacs/node-graceful-fs/pull/119 -->
  <!-- ============================================= -->
  <profiles>
    <profile>
      <id>jest-windows-profile</id>
      <activation>
        <os>
          <family>windows</family>
        </os>
      </activation>
      <properties>
        <jest.command>--runInBand</jest.command>
      </properties>
    </profile>
  </profiles>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.6.1</version>
        <executions>
          <execution>
            <id>clean.dist.folder</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${basedir}/dist</directory>
                </fileset>
                <fileset>
                  <directory>${basedir}/coverage</directory>
                </fileset>
                <fileset>
                  <directory>${basedir}/../dox-sequence-diagram-ui/dist
                  </directory>
                </fileset>
              </filesets>
            </configuration>
          </execution>
          <execution>
            <id>clean.nodemodules.folder</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <skip>${skipUICleanup}</skip>
              <filesets>
                <fileset>
                  <directory>${basedir}/node_modules</directory>
                </fileset>
                <fileset>
                  <directory>${basedir}/../dox-sequence-diagram-ui/node_modules
                  </directory>
                </fileset>
              </filesets>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- ============================================= -->
      <!-- Build the UI module node code -->
      <!-- ============================================= -->
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>

        <configuration>
          <installDirectory>${project.parent.parent.basedir}</installDirectory>
        </configuration>

        <executions>

          <execution>
            <id>install node and yarn</id>
            <goals>
              <goal>install-node-and-yarn</goal>
            </goals>
            <configuration>
              <nodeVersion>v10.17.0</nodeVersion>
              <yarnVersion>v1.19.1</yarnVersion>
            </configuration>
          </execution>

          <execution>
            <id>yarn install in dox-sequence-diagram-ui</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <configuration>
              <workingDirectory>${project.basedir}/../dox-sequence-diagram-ui
              </workingDirectory>
              <arguments>install</arguments>
            </configuration>
          </execution>
          <execution>
            <id>yarn build in dox-sequence-diagram-ui</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <configuration>
              <workingDirectory>${project.basedir}/../dox-sequence-diagram-ui
              </workingDirectory>
              <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
              <arguments>build</arguments>
            </configuration>
          </execution>

          <execution>
            <id>yarn install</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <configuration>
              <arguments>install</arguments>
            </configuration>
          </execution>

          <execution>
            <id>yarn build</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <configuration>
              <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
              <arguments>build --version=${project.version} --env.version=${project.version} --env.language=en</arguments>
            </configuration>
          </execution>
          <execution>
            <id>ui test</id>
            <goals>
              <goal>yarn</goal>
            </goals>
            <configuration>
              <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
              <arguments>test-build ${jest.command}</arguments>
              <skip>${skipTests}</skip>
            </configuration>
            <!-- for some reason does not fail on test phase -->
            <phase>test</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>${maven.war.plugin.version}</version>
        <configuration>
          <webResources>
            <resource>
              <directory>${basedir}/dist</directory>
              <includes>
                <include>*.html</include>
                <include>*.js</include>
              </includes>
            </resource>
            <resource>
              <directory>${basedir}/src</directory>
              <includes>
                <include>**/*.json</include>
              </includes>
            </resource>
            <resource>
              <directory>${basedir}/external-resources/healthcheck/</directory>
              <targetPath>v1.0</targetPath>
              <filtering>true</filtering>
              <includes>
                <include>healthcheck</include>
              </includes>
            </resource>
            <resource>
              <directory>${basedir}/webapp-onboarding</directory>
              <filtering>true</filtering>
            </resource>
          </webResources>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>