Class UIUtils

java.lang.Object
org.wso2.carbon.andes.ui.UIUtils

public class UIUtils extends Object
This class is used by the UI to connect to services and provides utilities. Used by JSP pages.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.wso2.carbon.andes.stub.AndesAdminServiceStub
    getAndesAdminServiceStub(javax.servlet.ServletConfig config, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest request)
    Gets the AndesAdminServices stub.
    static org.wso2.carbon.andes.event.stub.service.AndesEventAdminServiceStub
    getAndesEventAdminServiceStub(javax.servlet.ServletConfig config, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest request)
    Get the AndesEventAdminService stub
    static org.wso2.carbon.andes.mgt.stub.AndesManagerServiceStub
    getAndesManagerServiceStub(javax.servlet.ServletConfig config, javax.servlet.http.HttpSession session)
    Get Andes Manager Service stub.
    static org.wso2.carbon.andes.stub.admin.types.Queue[]
    getFilteredQueueList(org.wso2.carbon.andes.stub.admin.types.Queue[] fullList, int startingIndex, int maxQueueCount)
    filter the full queue list to suit the range Suppressing warning of unused declaration as it used by the UI (JSP pages)
    static ArrayList<org.wso2.carbon.andes.stub.admin.types.QueueRolePermission>
    getFilteredRoleList(ArrayList<org.wso2.carbon.andes.stub.admin.types.QueueRolePermission> allPermissions, int startingIndex, int maxRolesCount)
    Filter the full user-roles list to suit the range.
    static org.wso2.carbon.andes.stub.admin.types.Subscription[]
    getFilteredSubscriptionList(org.wso2.carbon.andes.stub.admin.types.Subscription[] fullList, int startingIndex, int maxSubscriptionCount)
    Gets filtered list of subscription list Suppressing warning of unused declaration as it used by the UI (JSP pages)
    static String
    Gets html string value encoded.
    static String
    getTCPConnectionURL(String userName, String accessKey)
    Gets the TCP connection url to reach the broker by using the currently logged in user and the access key for the user, generated by andes Authentication Service Suppressing warning of unused declaration as it used by the UI (JSP pages)
    static boolean
    Checks if its SSL

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • UIUtils

      public UIUtils()
  • Method Details

    • getHtmlString

      public static String getHtmlString(String message)
      Gets html string value encoded. i.e invalid input: '<' becomes < and > becomes > Suppressing warning of unused declaration as it used by the UI (JSP pages)
      Parameters:
      message - the string value
      Returns:
      encoded string value
    • getAndesAdminServiceStub

      public static org.wso2.carbon.andes.stub.AndesAdminServiceStub getAndesAdminServiceStub(javax.servlet.ServletConfig config, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest request) throws org.apache.axis2.AxisFault
      Gets the AndesAdminServices stub.
      Parameters:
      config - the servlet configuration
      session - the http session
      request - the http servlet request
      Returns:
      an AndesAdminServiceStub
      Throws:
      org.apache.axis2.AxisFault
    • getAndesManagerServiceStub

      public static org.wso2.carbon.andes.mgt.stub.AndesManagerServiceStub getAndesManagerServiceStub(javax.servlet.ServletConfig config, javax.servlet.http.HttpSession session) throws org.apache.axis2.AxisFault
      Get Andes Manager Service stub. This stub has methods to receive cluster related information
      Parameters:
      config - the servlet configuration
      session - the http session
      Returns:
      instance of AndesManagerServiceStub
      Throws:
      Exception
      org.apache.axis2.AxisFault
    • getAndesEventAdminServiceStub

      public static org.wso2.carbon.andes.event.stub.service.AndesEventAdminServiceStub getAndesEventAdminServiceStub(javax.servlet.ServletConfig config, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest request) throws org.apache.axis2.AxisFault
      Get the AndesEventAdminService stub
      Parameters:
      config - the servlet configuration
      session - the http session
      request - the http servlet request
      Returns:
      an AndesEventAdminServiceStub
      Throws:
      org.apache.axis2.AxisFault
    • getFilteredQueueList

      public static org.wso2.carbon.andes.stub.admin.types.Queue[] getFilteredQueueList(org.wso2.carbon.andes.stub.admin.types.Queue[] fullList, int startingIndex, int maxQueueCount)
      filter the full queue list to suit the range Suppressing warning of unused declaration as it used by the UI (JSP pages)
      Parameters:
      fullList - a complete list of queues
      startingIndex - the starting index to start from the queue list
      maxQueueCount - the maximum queue count to limit
      Returns:
      an array of queues
    • getFilteredSubscriptionList

      public static org.wso2.carbon.andes.stub.admin.types.Subscription[] getFilteredSubscriptionList(org.wso2.carbon.andes.stub.admin.types.Subscription[] fullList, int startingIndex, int maxSubscriptionCount)
      Gets filtered list of subscription list Suppressing warning of unused declaration as it used by the UI (JSP pages)
      Parameters:
      fullList - the complete list of subscriptions
      startingIndex - the starting index to start from the subscription list
      maxSubscriptionCount - the maximum subscription count to limit
      Returns:
      an array of subscriptions
    • getTCPConnectionURL

      public static String getTCPConnectionURL(String userName, String accessKey) throws FileNotFoundException, XMLStreamException, org.wso2.andes.kernel.AndesException
      Gets the TCP connection url to reach the broker by using the currently logged in user and the access key for the user, generated by andes Authentication Service Suppressing warning of unused declaration as it used by the UI (JSP pages)
      Parameters:
      userName - - currently logged in user
      accessKey - - the key (uuid) generated by authentication service
      Returns:
      the tcp connection url
      Throws:
      FileNotFoundException
      XMLStreamException
      org.wso2.andes.kernel.AndesException
    • isSSLOnly

      public static boolean isSSLOnly() throws FileNotFoundException, XMLStreamException
      Checks if its SSL
      Returns:
      true if its SSL, false otherwise.
      Throws:
      FileNotFoundException
      XMLStreamException
    • getFilteredRoleList

      public static ArrayList<org.wso2.carbon.andes.stub.admin.types.QueueRolePermission> getFilteredRoleList(ArrayList<org.wso2.carbon.andes.stub.admin.types.QueueRolePermission> allPermissions, int startingIndex, int maxRolesCount)
      Filter the full user-roles list to suit the range. Suppressing warning of unused declaration as it used by the UI (JSP pages)
      Parameters:
      allPermissions - full list of roles
      startingIndex - starting index to filter
      maxRolesCount - maximum number of roles that the filtered list can contain
      Returns:
      ArrayList