- * This value is read from the <wcm> config section in - * web-client-config-wcm.xml - *
- * - * @return Username for remote machine - */ - public static String getRemoteDeploymentUsername() - { - String username = "admin"; - - ConfigElement deploymentConfig = getDeploymentConfig(); - if (deploymentConfig != null) - { - ConfigElement elem = deploymentConfig.getChild("remote-username"); - if (elem != null) - { - username = elem.getValue(); - } - } - - return username; - } - - /** - * Returns the password to use on the remote machine being deployed to - *- * This value is read from the <wcm> config section in - * web-client-config-wcm.xml - *
- * - * @return Password for remote machine - */ - public static String getRemoteDeploymentPassword() - { - String password = "admin"; - - ConfigElement deploymentConfig = getDeploymentConfig(); - if (deploymentConfig != null) - { - ConfigElement elem = deploymentConfig.getChild("remote-password"); - if (elem != null) - { - password = elem.getValue(); - } - } - - return password; - } - /** * Returns the number of seconds between each call back to the server to * obtain the latest status of an in progress deployment. @@ -380,123 +328,6 @@ public final class AVMUtil return pollFreq; } - /** - * Returns the default RMI registry port to use when one is not supplied - * for target Alfresco deployment servers. - *- * This value is read from the <wcm> config section in - * web-client-config-wcm.xml - *
- * - * @return The remote RMI registry port to use for deployments. - * The default is 50500. - */ - public static int getRemoteRMIRegistryPort() - { - int rmiPort = 50500; - - ConfigElement deploymentConfig = getDeploymentConfig(); - if (deploymentConfig != null) - { - ConfigElement elem = deploymentConfig.getChild("remote-rmi-port"); - if (elem != null) - { - try - { - int value = Integer.parseInt(elem.getValue()); - if (value > 0) - { - rmiPort = value; - } - } - catch (NumberFormatException nfe) - { - // do nothing, just use the default - } - } - } - - return rmiPort; - } - - /** - * Returns the default RMI port to use when one is not supplied - * for target deployment receivers. - *- * This value is read from the <wcm> config section in - * web-client-config-wcm.xml - *
- * - * @return The deployment receiver RMI port to use for deployments. - * The default is 44100. - */ - public static int getRemoteReceiverRMIPort() - { - int rmiPort = 44100; - - ConfigElement deploymentConfig = getDeploymentConfig(); - if (deploymentConfig != null) - { - ConfigElement elem = deploymentConfig.getChild("receiver-rmi-port"); - if (elem != null) - { - try - { - int value = Integer.parseInt(elem.getValue()); - if (value > 0) - { - rmiPort = value; - } - } - catch (NumberFormatException nfe) - { - // do nothing, just use the default - } - } - } - - return rmiPort; - } - - /** - * Returns the delay (in seconds) to apply to the start of a deployment - * operation (mainly for demo and testing purposes). - *- * This value is read from the <wcm> config section in - * web-client-config-wcm.xml - *
- * - * @return The delay to use at the start of a deployment. - * The default is 30. - */ - public static int getRemoteDeploymentDelay() - { - int delay = 30; - - ConfigElement deploymentConfig = getDeploymentConfig(); - if (deploymentConfig != null) - { - ConfigElement elem = deploymentConfig.getChild("delay"); - if (elem != null) - { - try - { - int value = Integer.parseInt(elem.getValue()); - if (value > 0) - { - delay = value; - } - } - catch (NumberFormatException nfe) - { - // do nothing, just use the default - } - } - } - - return delay; - } - /** * Returns the number of seconds between each call back to the server to * obtain the latest status of a link validation check. @@ -978,6 +809,44 @@ public final class AVMUtil return webProjectNode; } + + /** + * Retrieves the NodeRef of the deploymentattempt node with the given id + * + * @param attemptId The deployattemptid of the node to be found + * @return The NodeRef of the deploymentattempt node or null if not found + */ + public static NodeRef findDeploymentAttempt(String attemptId) + { + FacesContext fc = FacesContext.getCurrentInstance(); + SearchService searchService = Repository.getServiceRegistry(fc).getSearchService(); + + // construct the query + String query = "@wca\\:deployattemptid:\"" + attemptId + "\""; + + NodeRef attempt = null; + ResultSet results = null; + try + { + // execute the query + results = searchService.query(Repository.getStoreRef(), + SearchService.LANGUAGE_LUCENE, query); + + if (results.length() == 1) + { + attempt = results.getNodeRef(0); + } + } + finally + { + if (results != null) + { + results.close(); + } + } + + return attempt; + } /** * Creates all directories for a path if they do not already exist. diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java index af62b79667..0973837019 100644 --- a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java @@ -25,7 +25,6 @@ package org.alfresco.web.bean.wcm; import java.io.Serializable; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -85,7 +84,6 @@ import org.apache.commons.logging.LogFactory; */ public class CreateWebsiteWizard extends BaseWizardBean { - private static final String MSG_DEPLOY_TO_HELP = "deploy_to_help"; private static final String MSG_USERROLES = "create_website_summary_users"; private static final String COMPONENT_FORMLIST = "form-list"; @@ -112,7 +110,6 @@ public class CreateWebsiteWizard extends BaseWizardBean protected String name; protected String description; protected String webapp = WEBAPP_DEFAULT; - protected List");
- out.write(server);
+ out.write(serverName);
out.write(" ");
if (monitoring)
{
diff --git a/source/java/org/alfresco/web/ui/wcm/component/UIDeploymentReports.java b/source/java/org/alfresco/web/ui/wcm/component/UIDeploymentReports.java
index ed9e3448e4..161afa71a1 100644
--- a/source/java/org/alfresco/web/ui/wcm/component/UIDeploymentReports.java
+++ b/source/java/org/alfresco/web/ui/wcm/component/UIDeploymentReports.java
@@ -36,6 +36,9 @@ import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.model.WCMAppModel;
+import org.alfresco.repo.domain.PropertyValue;
+import org.alfresco.sandbox.SandboxConstants;
+import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
@@ -44,6 +47,7 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Repository;
+import org.alfresco.web.bean.wcm.AVMUtil;
import org.alfresco.web.ui.common.PanelGenerator;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.SelfRenderingComponent;
@@ -117,22 +121,47 @@ public class UIDeploymentReports extends SelfRenderingComponent
if (logger.isDebugEnabled())
logger.debug("Rendering deployment reports for: " + webProject.toString());
- // render the supporting JavaScript
- renderScript(context, out);
-
- // iterate through each deployment report
NodeService nodeService = Repository.getServiceRegistry(context).getNodeService();
ContentService contentService = Repository.getServiceRegistry(context).getContentService();
- List |
||
- |
-
- |
-
-
- |
-