Examples of Udp


Examples of it.eng.spagobi.tools.udp.bo.Udp


  public Udp loadById(Integer id) {
    logger.debug("IN");
    Session session = getSession();
    Udp udp = null;
    Transaction tx = null;
    try {
      tx = session.beginTransaction();
      SbiUdp prop = (SbiUdp)session.get(SbiUdp.class, id);
      tx.commit();
View Full Code Here

Examples of it.eng.spagobi.tools.udp.bo.Udp

   * @throws EMFUserError
   */

  public Udp loadByLabel(String label) throws EMFUserError {
    logger.debug("IN");
    Udp udp = null;
    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
View Full Code Here

Examples of it.eng.spagobi.tools.udp.bo.Udp

   * @throws EMFUserError
   */

  public Udp loadByLabelAndFamily(String label, String family) throws EMFUserError {
    logger.debug("IN");
    Udp udp = null;
    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
View Full Code Here

Examples of it.eng.spagobi.tools.udp.bo.Udp

      List<SbiUdp> list = (List<SbiUdp>)query.list();
      if(list != null){
        toReturn = new ArrayList<Udp>();
        for (Iterator iterator = list.iterator(); iterator.hasNext();) {
          SbiUdp sbiUdp = (SbiUdp) iterator.next();
          Udp udp = toUdp(sbiUdp);
          toReturn.add(udp);
        }
      }
      tx.commit();
View Full Code Here

Examples of it.eng.spagobi.tools.udp.bo.Udp

 


  public Udp toUdp(SbiUdp sbiUdp){
    logger.debug("IN");
    Udp toReturn=new Udp();

    toReturn.setUdpId(sbiUdp.getUdpId());
    toReturn.setLabel(sbiUdp.getLabel());
    toReturn.setName(sbiUdp.getName());
    toReturn.setDescription(sbiUdp.getDescription());
    toReturn.setDataTypeId(sbiUdp.getTypeId());
    toReturn.setFamilyId(sbiUdp.getFamilyId());
    toReturn.setMultivalue(sbiUdp.isIsMultivalue());

    // get the type ValueCd
    if (sbiUdp.getTypeId() != null){
      Domain domain;
      try {
        domain = DAOFactory.getDomainDAO().loadDomainById(sbiUdp.getTypeId());
        toReturn.setDataTypeValeCd(domain.getValueCd());
      } catch (EMFUserError e) {
        logger.error("error in loading domain with Id "+sbiUdp.getTypeId(), e);
      }
    }
    logger.debug("OUT");
View Full Code Here

Examples of it.eng.spagobi.tools.udp.bo.Udp

            //udpValue.setLabel(label);
            udpValue.setValue(value);
            udpValue.setReferenceId(kpiId);

            // get the UDP to get ID (otherwise could be taken in js page)
            Udp udp = DAOFactory.getUdpDAO().loadByLabelAndFamily(label, "KPI");
            Domain familyDomain = DAOFactory.getDomainDAO().loadDomainById(udp.getFamilyId());

            Integer idUdp = udp.getUdpId();

            udpValue.setLabel(udp.getLabel());
            udpValue.setName(udp.getName());
            udpValue.setFamily(familyDomain != null ? familyDomain.getValueCd() : null);
            udpValue.setUdpId(udp.getUdpId());

            udpValues.add(udpValue);
          }

          k.setUdpValues(udpValues);
View Full Code Here

Examples of it.eng.spagobi.tools.udp.bo.Udp

          Domain type = (Domain)udpFamilies.get(i);
          //kpi udp/model udp
          List<Udp> udpList = DAOFactory.getUdpDAO().loadAllByFamily(type.getValueCd());
          if(udpList != null && !udpList.isEmpty()){
            for (Iterator iterator = udpList.iterator(); iterator.hasNext();) {
              Udp udp = (Udp) iterator.next();
              exporter.insertUdp(udp, session);         
            }
          }
        }
      }
View Full Code Here

Examples of it.eng.spagobi.tools.udp.bo.Udp

          udpValue.setLabel(obj.getString("label"));
          udpValue.setValue(value);
          udpValue.setReferenceId(model.getId());

          // get the UDP to get ID (otherwise could be taken in js page)
          Udp udp = DAOFactory.getUdpDAO().loadByLabelAndFamily(labelJ, "MODEL");
          Domain familyDomain = DAOFactory.getDomainDAO().loadDomainById(udp.getFamilyId());
          logger.debug("Udp value assigning value "+value+" to UDP with label "+udp.getLabel()+ " and Model Instance with label "+ model.getLabel());
          udpValue.setLabel(udp.getLabel());
          udpValue.setName(udp.getName());
          udpValue.setFamily(familyDomain != null ? familyDomain.getValueCd() : null);
          udpValue.setUdpId(udp.getUdpId());

          udpValues.add(udpValue);
        }
        model.setUdpValues(udpValues);
       
View Full Code Here

Examples of net.floodlightcontroller.packet.UDP

                        TCP tcp_pkt = (TCP) ip_pkt.getPayload();
                        client.srcPort = tcp_pkt.getSourcePort();
                        client.targetPort = tcp_pkt.getDestinationPort();
                    }
                    if (ip_pkt.getPayload() instanceof UDP) {
                        UDP udp_pkt = (UDP) ip_pkt.getPayload();
                        client.srcPort = udp_pkt.getSourcePort();
                        client.targetPort = udp_pkt.getDestinationPort();
                    }
                    if (ip_pkt.getPayload() instanceof ICMP) {
                        client.srcPort = 8;
                        client.targetPort = 0;
                    }
View Full Code Here

Examples of net.floodlightcontroller.packet.UDP

        // dl_type type
        IPv4 pkt_ip = null;

        // nw_proto types
        TCP pkt_tcp = null;
        UDP pkt_udp = null;

        // tp_src and tp_dst (tp port numbers)
        short pkt_tp_src = 0;
        short pkt_tp_dst = 0;

        // switchID matches?
        if (wildcard_dpid == false && dpid != switchDpid)
            return false;

        // in_port matches?
        if (wildcard_in_port == false && in_port != inPort)
            return false;
        if (action == FirewallRule.FirewallAction.DENY) {
            wildcards.drop &= ~OFMatch.OFPFW_IN_PORT;
        } else {
            wildcards.allow &= ~OFMatch.OFPFW_IN_PORT;
        }

        // mac address (src and dst) match?
        if (wildcard_dl_src == false
                && dl_src != packet.getSourceMAC().toLong())
            return false;
        if (action == FirewallRule.FirewallAction.DENY) {
            wildcards.drop &= ~OFMatch.OFPFW_DL_SRC;
        } else {
            wildcards.allow &= ~OFMatch.OFPFW_DL_SRC;
        }

        if (wildcard_dl_dst == false
                && dl_dst != packet.getDestinationMAC().toLong())
            return false;
        if (action == FirewallRule.FirewallAction.DENY) {
            wildcards.drop &= ~OFMatch.OFPFW_DL_DST;
        } else {
            wildcards.allow &= ~OFMatch.OFPFW_DL_DST;
        }

        // dl_type check: ARP, IP

        // if this is not an ARP rule but the pkt is ARP,
        // return false match - no need to continue protocol specific check
        if (wildcard_dl_type == false) {
            if (dl_type == Ethernet.TYPE_ARP) {
                if (packet.getEtherType() != Ethernet.TYPE_ARP)
                    return false;
                else {
                    if (action == FirewallRule.FirewallAction.DENY) {
                        wildcards.drop &= ~OFMatch.OFPFW_DL_TYPE;
                    } else {
                        wildcards.allow &= ~OFMatch.OFPFW_DL_TYPE;
                    }
                }
            } else if (dl_type == Ethernet.TYPE_IPv4) {
                if (packet.getEtherType() != Ethernet.TYPE_IPv4)
                    return false;
                else {
                    if (action == FirewallRule.FirewallAction.DENY) {
                        wildcards.drop &= ~OFMatch.OFPFW_NW_PROTO;
                    } else {
                        wildcards.allow &= ~OFMatch.OFPFW_NW_PROTO;
                    }
                    // IP packets, proceed with ip address check
                    pkt_ip = (IPv4) pkt;

                    // IP addresses (src and dst) match?
                    if (wildcard_nw_src == false
                            && this.matchIPAddress(nw_src_prefix,
                                    nw_src_maskbits, pkt_ip.getSourceAddress()) == false)
                        return false;
                    if (action == FirewallRule.FirewallAction.DENY) {
                        wildcards.drop &= ~OFMatch.OFPFW_NW_SRC_ALL;
                        wildcards.drop |= (nw_src_maskbits << OFMatch.OFPFW_NW_SRC_SHIFT);
                    } else {
                        wildcards.allow &= ~OFMatch.OFPFW_NW_SRC_ALL;
                        wildcards.allow |= (nw_src_maskbits << OFMatch.OFPFW_NW_SRC_SHIFT);
                    }

                    if (wildcard_nw_dst == false
                            && this.matchIPAddress(nw_dst_prefix,
                                    nw_dst_maskbits,
                                    pkt_ip.getDestinationAddress()) == false)
                        return false;
                    if (action == FirewallRule.FirewallAction.DENY) {
                        wildcards.drop &= ~OFMatch.OFPFW_NW_DST_ALL;
                        wildcards.drop |= (nw_dst_maskbits << OFMatch.OFPFW_NW_DST_SHIFT);
                    } else {
                        wildcards.allow &= ~OFMatch.OFPFW_NW_DST_ALL;
                        wildcards.allow |= (nw_dst_maskbits << OFMatch.OFPFW_NW_DST_SHIFT);
                    }

                    // nw_proto check
                    if (wildcard_nw_proto == false) {
                        if (nw_proto == IPv4.PROTOCOL_TCP) {
                            if (pkt_ip.getProtocol() != IPv4.PROTOCOL_TCP)
                                return false;
                            else {
                                pkt_tcp = (TCP) pkt_ip.getPayload();
                                pkt_tp_src = pkt_tcp.getSourcePort();
                                pkt_tp_dst = pkt_tcp.getDestinationPort();
                            }
                        } else if (nw_proto == IPv4.PROTOCOL_UDP) {
                            if (pkt_ip.getProtocol() != IPv4.PROTOCOL_UDP)
                                return false;
                            else {
                                pkt_udp = (UDP) pkt_ip.getPayload();
                                pkt_tp_src = pkt_udp.getSourcePort();
                                pkt_tp_dst = pkt_udp.getDestinationPort();
                            }
                        } else if (nw_proto == IPv4.PROTOCOL_ICMP) {
                            if (pkt_ip.getProtocol() != IPv4.PROTOCOL_ICMP)
                                return false;
                            else {
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.