Class ImportAssetsServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class ImportAssetsServlet
    extends javax.servlet.http.HttpServlet

    ImportAssetsServlet class.

    Author:
    Lawrence Karnowski, Benjamin Reed
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected AssetModel model  
      protected java.lang.String redirectSuccess
      The URL to redirect the client to in case of success.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<Asset> decodeAssetsText​(java.lang.String text)
      decodeAssetsText
      void doPost​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Acknowledge the events specified in the POST and then redirect the client to an appropriate URL for display.
      java.util.List<java.lang.Integer> getCurrentAssetNodesList()
      getCurrentAssetNodesList
      void init()
      Looks up the redirect.success parameter in the servlet's configuration.
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • redirectSuccess

        protected java.lang.String redirectSuccess
        The URL to redirect the client to in case of success.
    • Constructor Detail

      • ImportAssetsServlet

        public ImportAssetsServlet()
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException
        Looks up the redirect.success parameter in the servlet's configuration. If not present, this servlet will throw an exception so it will be marked unavailable.
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException - if any.
      • doPost

        public void doPost​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws javax.servlet.ServletException,
                           java.io.IOException
        Acknowledge the events specified in the POST and then redirect the client to an appropriate URL for display.
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • decodeAssetsText

        public java.util.List<Asset> decodeAssetsText​(java.lang.String text)
                                               throws org.opennms.web.asset.ImportAssetsServlet.AssetException

        decodeAssetsText

        Parameters:
        text - a String object.
        Returns:
        a List object.
        Throws:
        org.opennms.web.asset.ImportAssetsServlet$AssetException - if any.
        org.opennms.web.asset.ImportAssetsServlet.AssetException
      • getCurrentAssetNodesList

        public java.util.List<java.lang.Integer> getCurrentAssetNodesList()
                                                                   throws java.sql.SQLException

        getCurrentAssetNodesList

        Returns:
        a List object.
        Throws:
        java.sql.SQLException - if any.