Package org.apache.jetspeed.portlets.wicket

Examples of org.apache.jetspeed.portlets.wicket.AbstractAdminWebApplication


             * @see org.apache.wicket.markup.html.form.Button#onSubmit()
             */
            @Override
            public void onSubmit()
            {
                AbstractAdminWebApplication app = ((AbstractAdminWebApplication)getApplication());
                FeedbackPanel feedback = (FeedbackPanel) UploadPortletApp.this.get("feedback");
                final FileUpload upload = fileUpload;
                if (upload != null)
                {
                    InputStream warStream = null;
                    File tempFile = null;
                    try
                    {
                        warStream = upload.getInputStream();           
                        tempFile = File.createTempFile(upload.getClientFileName(), "");                       
                        String tmpDir = System.getProperty("java.io.tmpdir");
                        tempFile = new File(tmpDir, upload.getClientFileName());
                        if (tempFile.exists())
                            tempFile.delete();
                        FileOutputStream fos = new FileOutputStream(tempFile);
                        drain(warStream, fos);
                        fos.close();
                       
                        UploadPortletApp.this.dm.deploy(tempFile);
                        feedback.info("Deployed 1 portlet application to server: " + upload.getClientFileName());
                        app.getServiceLocator().getAuditActivity().logAdminRegistryActivity(
                                app.getUserPrincipalName(), app.getIPAddress(), AuditActivity.REGISTRY_DEPLOY, ApplicationsListHome.PORTLET_REGISTRY_MANAGER);                                                   
                    }
                    catch (Exception e)
                    {
                        String msg = "Failed to upload document: " + upload.getClientFileName();
                        log.error(msg, e);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portlets.wicket.AbstractAdminWebApplication

Copyright © 2018 www.massapicom. 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.