コード例 #1
0
 void updateInterface(
     final String foreignId, final String ipAddress, final MultivaluedMapImpl params) {
   final String foreignSource = m_foreignSource;
   LOG.debug(
       "updateInterface: Updating interface {} on node {}/{}",
       ipAddress,
       foreignSource,
       foreignId);
   if (params.isEmpty()) return;
   final Requisition req = getActiveRequisition(false);
   if (req != null) {
     final RequisitionNode node = req.getNode(foreignId);
     if (node != null) {
       final RequisitionInterface iface = node.getInterface(ipAddress);
       if (iface != null) {
         req.updateDateStamp();
         RestUtils.setBeanProperties(iface, params);
         save(req);
         LOG.debug(
             "updateInterface: Interface {} on node {}/{} updated",
             ipAddress,
             foreignSource,
             foreignId);
       }
     }
   }
 }
コード例 #2
0
 void updateRequisition(final MultivaluedMapImpl params) {
   final String foreignSource = m_foreignSource;
   LOG.debug("updateRequisition: Updating requisition with foreign source {}", foreignSource);
   if (params.isEmpty()) return;
   final Requisition req = getActiveRequisition(false);
   if (req != null) {
     req.updateDateStamp();
     RestUtils.setBeanProperties(req, params);
     save(req);
     LOG.debug("updateRequisition: Requisition with foreign source {} updated", foreignSource);
   }
 }
コード例 #3
0
 void updateNode(final String foreignId, final MultivaluedMapImpl params) {
   final String foreignSource = m_foreignSource;
   LOG.debug(
       "updateNode: Updating node with foreign source {} and foreign id {}",
       foreignSource,
       foreignId);
   if (params.isEmpty()) return;
   final Requisition req = getActiveRequisition(false);
   if (req != null) {
     final RequisitionNode node = req.getNode(foreignId);
     if (node != null) {
       req.updateDateStamp();
       RestUtils.setBeanProperties(node, params);
       save(req);
       LOG.debug(
           "updateNode: Node with foreign source {} and foreign id {} updated",
           foreignSource,
           foreignId);
     }
   }
 }