Package org.wso2.carbon.andes.ui
Class UIUtils
java.lang.Object
org.wso2.carbon.andes.ui.UIUtils
This class is used by the UI to connect to services and provides utilities. Used by JSP pages.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.wso2.carbon.andes.stub.AndesAdminServiceStubgetAndesAdminServiceStub(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.AndesEventAdminServiceStubgetAndesEventAdminServiceStub(javax.servlet.ServletConfig config, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletRequest request) Get the AndesEventAdminService stubstatic org.wso2.carbon.andes.mgt.stub.AndesManagerServiceStubgetAndesManagerServiceStub(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 StringgetHtmlString(String message) Gets html string value encoded.static StringgetTCPConnectionURL(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 booleanChecks if its SSL
-
Field Details
-
QPID_CONF
- See Also:
-
-
Constructor Details
-
UIUtils
public UIUtils()
-
-
Method Details
-
getHtmlString
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 configurationsession- the http sessionrequest- 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 configurationsession- the http session- Returns:
- instance of AndesManagerServiceStub
- Throws:
Exceptionorg.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 configurationsession- the http sessionrequest- 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 queuesstartingIndex- the starting index to start from the queue listmaxQueueCount- 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 subscriptionsstartingIndex- the starting index to start from the subscription listmaxSubscriptionCount- 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 useraccessKey- - the key (uuid) generated by authentication service- Returns:
- the tcp connection url
- Throws:
FileNotFoundExceptionXMLStreamExceptionorg.wso2.andes.kernel.AndesException
-
isSSLOnly
Checks if its SSL- Returns:
- true if its SSL, false otherwise.
- Throws:
FileNotFoundExceptionXMLStreamException
-
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 rolesstartingIndex- starting index to filtermaxRolesCount- maximum number of roles that the filtered list can contain- Returns:
- ArrayList
-