Examples of ApplicationServerManagerResult


Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

                   
                    if (isServerReady(asm, feed, "start", pa, pab))
                    {
                        try
                        {
                            ApplicationServerManagerResult result = asm.start(pa.getContextPath());
                           
                            if (!result.isOk())
                            {
                                throw new Exception(getString("pam.details.action.status.appServerNotConfigured"));
                            }
                            else
                            {
                                StringResourceModel resModel = new StringResourceModel("pam.details.action.status.startOK", this, null, new Object [] { pab.getPath() } );
                                feed.info(resModel.getString());
                                auditActivity.logAdminRegistryActivity(
                                                                       ((AbstractAdminWebApplication) getApplication()).getUserPrincipalName(),
                                                                       ((AbstractAdminWebApplication) getApplication()).getIPAddress(),
                                                                       AuditActivity.REGISTRY_START,
                                                                       PORTLET_REGISTRY_MANAGER
                                                                       );
                            }
                        }
                        catch (Exception e)
                        {
                            StringResourceModel resModel = new StringResourceModel("pam.details.action.status.startFailure", this, null, new Object [] { pab.getPath(), e.getMessage() } );
                            feed.error(resModel.getString());
                        }
                    }
                }
            };

            Link<String> stop = new Link<String>("stop")
            {
                private static final long serialVersionUID = 1L;

                public void onClick()
                {
                    JetspeedServiceLocator locator = ((AbstractAdminWebApplication) getApplication()).getServiceLocator();
                    PortletRegistry registry = locator.getPortletRegistry();
                    ApplicationServerManager asm = locator.getApplicationServerManager();
                    AuditActivity auditActivity = locator.getAuditActivity();

                    ApplicationBean pab = (ApplicationBean) model.getObject();
                    PortletApplication pa = registry.getPortletApplication(pab.getApplicationName());
                    FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
                   
                    if (isServerReady(asm, feed, "stop", pa, pab))
                    {
                        try
                        {
                            ApplicationServerManagerResult result = asm.stop(pa.getContextPath());
                           
                            if (!result.isOk())
                            {
                                throw new Exception(getString("pam.details.action.status.appServerNotConfigured"));
                            }
                            else
                            {
                                StringResourceModel resModel = new StringResourceModel("pam.details.action.status.stopOK", this, null, new Object [] { pab.getPath() } );
                                feed.info(resModel.getString());
                               
                                auditActivity.logAdminRegistryActivity(
                                                                       ((AbstractAdminWebApplication) getApplication()).getUserPrincipalName(),
                                                                       ((AbstractAdminWebApplication) getApplication()).getIPAddress(),
                                                                       AuditActivity.REGISTRY_STOP,
                                                                       PORTLET_REGISTRY_MANAGER
                                                                       );
                            }
                        }
                        catch (Exception e)
                        {
                            StringResourceModel resModel = new StringResourceModel("pam.details.action.status.stopFailure", this, null, new Object [] { pab.getPath(), e.getMessage() } );
                            feed.error(resModel.getString());
                        }
                    }
                }
            };
           
            Link<String> undeploy = new Link<String>("undeploy")
            {
                private static final long serialVersionUID = 1L;

                public void onClick()
                {
                    JetspeedServiceLocator locator = ((AbstractAdminWebApplication) getApplication()).getServiceLocator();
                    PortletRegistry registry = locator.getPortletRegistry();
                    ApplicationServerManager asm = locator.getApplicationServerManager();
                    AuditActivity auditActivity = locator.getAuditActivity();

                    ApplicationBean pab = (ApplicationBean) model.getObject();
                    PortletApplication pa = registry.getPortletApplication(pab.getApplicationName());
                    FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
                   
                    if (isServerReady(asm, feed, "undeploy", pa, pab))
                    {
                        try
                        {
                            ApplicationServerManagerResult result = asm.undeploy(pa.getContextPath());
                           
                            if (!result.isOk())
                            {
                                throw new Exception(getString("pam.details.action.status.appServerNotConfigured"));
                            }
                            else
                            {
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.start(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.stop(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.undeploy(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.start(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.stop(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.undeploy(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.start(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.stop(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult

        }
        else
        {
            try
            {
                ApplicationServerManagerResult result = asm.undeploy(pa.getWebApplicationDefinition().getContextRoot());
                if ( !result.isOk() )
                {
                    publishStatusMessage(request, "PALM", "status", null, result.getMessage());
                }
            }
            catch (Exception e)
            {
                e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.