ru.bitel.bgbilling.modules.ipn.server.bean

## Class GatePortManager

- java.lang.Object
- - ru.bitel.bgbilling.modules.ipn.server.bean.GatePortManager

-     public class GatePortManager
      extends java.lang.Object

  Клас для работы с портами шлюзов
  Author:
    king

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.sql.Connection` | `con`
    `protected int` | `mid`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GatePortManager(java.sql.Connection con, int mid)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `deleteGatePorts(int cid, int gid)`
    `java.util.List<java.lang.Integer>` | `findFreePorts(int cid, int gid, int count, java.util.List<java.util.List<java.lang.Integer>> rangeList)`
    `java.util.List<Gate>` | `getAvailableGates(int cid)`
    `java.util.Map<java.lang.String,java.lang.Object>` | `getGatePortMap(int cid, int gid)`
    `java.util.List<java.util.Map<java.lang.String,java.lang.Object>>` | `getGatePortMaps(int contractId)`
    `java.util.List<java.lang.Integer>` | `getGatePorts(int cid, int gid)`
    `java.util.List<java.util.Map<java.lang.String,java.lang.Object>>` | `getPortMonitorMap(int gid)`
    `boolean` | `portsExists(int cid, int gid, java.util.List<java.lang.Integer> ports)`
    `boolean` | `updateGatePorts(int cid, int gid, java.util.List<java.lang.Integer> ports)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### mid

          protected int mid

    - #### con

          protected java.sql.Connection con

  - ### Constructor Detail

    - #### GatePortManager

          public GatePortManager(java.sql.Connection con,
                                 int mid)

  - ### Method Detail

    - #### getGatePortMaps

          public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getGatePortMaps(int contractId)
                                                                                           throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getPortMonitorMap

          public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getPortMonitorMap(int gid)
                                                                                             throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getGatePortMap

          public java.util.Map<java.lang.String,java.lang.Object> getGatePortMap(int cid,
                                                                                 int gid)
                                                                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### updateGatePorts

          public boolean updateGatePorts(int cid,
                                         int gid,
                                         java.util.List<java.lang.Integer> ports)
                                  throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### deleteGatePorts

          public boolean deleteGatePorts(int cid,
                                         int gid)
                                  throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### findFreePorts

          public java.util.List<java.lang.Integer> findFreePorts(int cid,
                                                                 int gid,
                                                                 int count,
                                                                 java.util.List<java.util.List<java.lang.Integer>> rangeList)
                                                          throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getAvailableGates

          public java.util.List<Gate> getAvailableGates(int cid)
                                                 throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### portsExists

          public boolean portsExists(int cid,
                                     int gid,
                                     java.util.List<java.lang.Integer> ports)
                              throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getGatePorts

          public java.util.List<java.lang.Integer> getGatePorts(int cid,
                                                                int gid)
                                                         throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`