Examples of ChannelType


Examples of com.denimgroup.threadfix.data.entities.ChannelType

      return;
    }
   
    log.info("Deleting scan with ID " + scan.getId());
   
    ChannelType type = scan.getApplicationChannel().getChannelType();
   
    if (scan.getApplication().getRemoteProviderApplications() != null) {
      for (RemoteProviderApplication app : scan.getApplication().getRemoteProviderApplications()) {
        if (app != null && app.getRemoteProviderType() != null &&
            app.getRemoteProviderType().getChannelType() != null &&
            app.getRemoteProviderType().getChannelType().getId() != null &&
            app.getRemoteProviderType().getChannelType().getId().equals(type.getId()) &&
            app.getLastImportTime() != null && scan.getImportTime() != null &&
            app.getLastImportTime().equals(scan.getImportTime()) &&
            app.getApplicationChannel() != null && app.getApplicationChannel().getScanList() != null){
          // This means that we are deleting the last scan for the importer and that we need to update the
          // last import time so that we can import more scans.
View Full Code Here

Examples of com.denimgroup.threadfix.data.entities.ChannelType

            throw new IllegalArgumentException("Invalid Generic Vulnerability ID: " + genericVulnerabilityId);
        }

        final MappingCreateResult result;

        ChannelType channelType = channelTypeDao.retrieveByName(channelName);

        if (channelType == null) {
            LOG.warn("Invalid ChannelType (" + channelName + ") submitted.");
            result = MappingCreateResult.BAD_CHANNEL_TYPE;
        } else {
View Full Code Here

Examples of com.denimgroup.threadfix.data.entities.ChannelType

        int updatedNo = 0, addedNewNo = 0;
        String updatedList = "", addedNewList = "";

        State state = State.NONE;

        ChannelType manualChannel = channelTypeDao.retrieveByName("Manual");

        String line;
        while ((line = bufferedReader.readLine()) != null) {
            if (line.startsWith("type.info")) {
                state = State.TYPE;
View Full Code Here

Examples of com.denimgroup.threadfix.data.entities.ChannelType

    protected GenericVulnerabilityDao genericVulnerabilityDao;

    public ChannelImporter getImporter(ScannerType type) {

        ApplicationChannel channel = new ApplicationChannel();
        channel.setChannelType(new ChannelType());
        channel.getChannelType().setName(type.getDbName());

        ChannelImporter importer = factory.getChannelImporter(channel);

        if (importer == null) {
View Full Code Here

Examples of eu.stratosphere.runtime.io.channels.ChannelType

      final int numberOfOutputGates = vertex.getNumberOfOutputGates();
      for (int i = 0; i < numberOfOutputGates; ++i) {

        final ExecutionGate outputGate = vertex.getOutputGate(i);
        final ChannelType channelType = outputGate.getChannelType();
        final int numberOfOutputChannels = outputGate.getNumberOfEdges();
        for (int j = 0; j < numberOfOutputChannels; ++j) {

          final ExecutionEdge outputChannel = outputGate.getEdge(j);
          final ExecutionVertex connectedVertex = outputChannel.getInputGate().getVertex();

          boolean recurse = false;

          if (!alreadyVisited.contains(connectedVertex)) {
            recurse = true;
          }

          if (channelType == ChannelType.IN_MEMORY
            && !pipeline.equals(connectedVertex.getExecutionPipeline())) {

            connectedVertex.setExecutionPipeline(pipeline);
            recurse = true;
          }

          if (recurse) {
            reconstructExecutionPipeline(connectedVertex, true, alreadyVisited);
          }
        }
      }
    } else {

      final int numberOfInputGates = vertex.getNumberOfInputGates();
      for (int i = 0; i < numberOfInputGates; ++i) {

        final ExecutionGate inputGate = vertex.getInputGate(i);
        final ChannelType channelType = inputGate.getChannelType();
        final int numberOfInputChannels = inputGate.getNumberOfEdges();
        for (int j = 0; j < numberOfInputChannels; ++j) {

          final ExecutionEdge inputChannel = inputGate.getEdge(j);
          final ExecutionVertex connectedVertex = inputChannel.getOutputGate().getVertex();
View Full Code Here

Examples of eu.stratosphere.runtime.io.channels.ChannelType

      final ManagementGroupVertexID targetGroupVertexID = new ManagementGroupVertexID();
      targetGroupVertexID.read(in);
      final ManagementGroupVertex targetGroupVertex = getGraph().getGroupVertexByID(targetGroupVertexID);
      final int sourceIndex = in.readInt();
      final int targetIndex = in.readInt();
      final ChannelType channelType = EnumUtils.readEnum(in, ChannelType.class);
      new ManagementGroupEdge(this, sourceIndex, targetGroupVertex, targetIndex, channelType);
    }

  }
View Full Code Here

Examples of eu.stratosphere.runtime.io.channels.ChannelType

      for (int i = 0; i < source.getNumberOfOutputGates(); i++) {

        final ExecutionGate outputGate = source.getOutputGate(i);
        final ManagementGate manangementOutputGate = gateMap.get(outputGate);
        final ChannelType channelType = outputGate.getChannelType();

        for (int j = 0; j < outputGate.getNumberOfEdges(); j++) {

          final ExecutionEdge outputChannel = outputGate.getEdge(j);
View Full Code Here

Examples of eu.stratosphere.runtime.io.channels.ChannelType

        final AbstractJobVertex tjv = edge.getConnectedVertex();

        final ExecutionVertex tev = vertexMap.get(tjv);
        final ExecutionGroupVertex tgv = tev.getGroupVertex();
        // Use NETWORK as default channel type if nothing else is defined by the user
        ChannelType channelType = edge.getChannelType();
        boolean userDefinedChannelType = true;
        if (channelType == null) {
          userDefinedChannelType = false;
          channelType = ChannelType.NETWORK;
        }
View Full Code Here

Examples of eu.stratosphere.runtime.io.channels.ChannelType

      final ExecutionVertex sourceVertex = it.next();

      for (int i = 0; i < sourceVertex.getNumberOfOutputGates(); ++i) {

        final ExecutionGate outputGate = sourceVertex.getOutputGate(i);
        final ChannelType channelType = outputGate.getChannelType();
        if (channelType == ChannelType.IN_MEMORY) {
          final int numberOfOutputChannels = outputGate.getNumberOfEdges();
          for (int j = 0; j < numberOfOutputChannels; ++j) {
            final ExecutionEdge outputChannel = outputGate.getEdge(j);
            outputChannel.getInputGate().getVertex()
              .setAllocatedResource(sourceVertex.getAllocatedResource());
          }
        }
      }
    }

    it = new ExecutionGraphIterator(this, false);
    while (it.hasNext()) {

      final ExecutionVertex targetVertex = it.next();

      for (int i = 0; i < targetVertex.getNumberOfInputGates(); ++i) {

        final ExecutionGate inputGate = targetVertex.getInputGate(i);
        final ChannelType channelType = inputGate.getChannelType();
        if (channelType == ChannelType.IN_MEMORY) {
          final int numberOfInputChannels = inputGate.getNumberOfEdges();
          for (int j = 0; j < numberOfInputChannels; ++j) {
            final ExecutionEdge inputChannel = inputGate.getEdge(j);
            inputChannel.getOutputGate().getVertex()
View Full Code Here

Examples of eu.stratosphere.runtime.io.channels.ChannelType

          final ManagementGate targetGate = targetVertex.getInputGate(targetGateIndex);

          final int sourceIndex = in.readInt();
          final int targetIndex = in.readInt();

          final ChannelType channelType = EnumUtils.readEnum(in, ChannelType.class);
          new ManagementEdge(sourceEdgeID, targetEdgeID, sourceGate, sourceIndex, targetGate, targetIndex,
            channelType);
        }

      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.