- Added support to the UI for file server deployment

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6155 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2007-07-04 11:11:56 +00:00
parent 1c200b5032
commit dd6a2c46c2
6 changed files with 51 additions and 7 deletions

View File

@@ -1152,7 +1152,7 @@ deploy_status_failed=FAILED
deploy_status_partial=PARTIAL FAILURE
reason=Reason
snapshot=Snapshot
deploy_to_help=A comma separated list of servers to deploy the website to.<p>Each entry can be a host name or an IP address and may also contain an RMI port number. If an RMI port number is not specified the default of {0} will be used.</p><p>Example: liveserver1, liveserver2:50900</p>
deploy_to_help=<p>A comma separated list of servers to deploy the website to. Each entry either represents the location of a Deployment Receiver or an Alfresco Repository.</p><p>A file server entry must be prefixed with '\\\\'. Each server can be represented by a host name or an IP address and may also contain an RMI port number. If an RMI port number is not specified for a Deployment Receiver the default of {0} will be used. If an RMI port number is not specified for an Alfresco Repository the default of {1} will be used.</p><p>Example: \\\\liveserver1, \\\\liveserver2:44200, liverserver3, liverserver4:50900</p>
content_launch=Content Launch
launch_date=Launch Date
expiration_date_header=Content Expiration

View File

@@ -19,8 +19,10 @@
<remote-username>admin</remote-username>
<!-- password to use on remote machine -->
<remote-password>admin</remote-password>
<!-- default RMI port to connect to on remote machine -->
<!-- default RMI port to connect to Alfresco server on remote machine -->
<remote-rmi-port>50500</remote-rmi-port>
<!-- default RMI port to connect to Deployment Receiver on remote machine -->
<receiver-rmi-port>44100</receiver-rmi-port>
<!-- frequency (in seconds) of polling checks to get latest status of a deployment -->
<progress-polling-frequency>2</progress-polling-frequency>
<!-- the delay (in seconds) to apply to a deployment (for testing and demo purposes) -->

View File

@@ -367,7 +367,7 @@ public final class AVMUtil
/**
* Returns the default RMI registry port to use when one is not supplied
* for target deployment servers.
* for target Alfresco deployment servers.
* <p>
* This value is read from the &lt;wcm&gt; config section in
* web-client-config-wcm.xml
@@ -404,6 +404,45 @@ public final class AVMUtil
return rmiPort;
}
/**
* Returns the default RMI port to use when one is not supplied
* for target deployment receivers.
* <p>
* This value is read from the &lt;wcm&gt; config section in
* web-client-config-wcm.xml
* </p>
*
* @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).

View File

@@ -508,8 +508,9 @@ public class CreateWebsiteWizard extends BaseWizardBean
{
String pattern = Application.getMessage(FacesContext.getCurrentInstance(),
"deploy_to_help");
String defaultPort = Integer.toString(AVMUtil.getRemoteRMIRegistryPort());
return MessageFormat.format(pattern, new Object[] {defaultPort});
String defaultAlfPort = Integer.toString(AVMUtil.getRemoteRMIRegistryPort());
String defaultReceiverPort = Integer.toString(AVMUtil.getRemoteReceiverRMIPort());
return MessageFormat.format(pattern, new Object[] {defaultReceiverPort, defaultAlfPort});
}
/**

View File

@@ -153,6 +153,8 @@ public class DeploySnapshotDialog extends BaseDialogBean
args.put(AVMDeploySnapshotAction.PARAM_TARGET_SERVER, targetServer);
args.put(AVMDeploySnapshotAction.PARAM_DEFAULT_RMI_PORT,
AVMUtil.getRemoteRMIRegistryPort());
args.put(AVMDeploySnapshotAction.PARAM_DEFAULT_RECEIVER_RMI_PORT,
AVMUtil.getRemoteReceiverRMIPort());
args.put(AVMDeploySnapshotAction.PARAM_REMOTE_USERNAME,
AVMUtil.getRemoteDeploymentUsername());
args.put(AVMDeploySnapshotAction.PARAM_REMOTE_PASSWORD,

View File

@@ -291,12 +291,12 @@ public class UIDeploymentReports extends SelfRenderingComponent
out.write("<div style='margin-top: 6px;'><img src='");
out.write(context.getExternalContext().getRequestContextPath());
out.write("/images/icons/collapsed.gif' style='vertical-align: -1px; cursor: pointer;' class='collapsed' onclick=\"toggleDeploymentDetails(this, '");
out.write(server.replace(':', '_'));
out.write(server.replace(':', '_').replace('\\', '_'));
out.write("');\" />&nbsp;");
out.write(Application.getMessage(context, "details"));
out.write("</div>\n");
out.write("<div id='");
out.write(server.replace(':', '_'));
out.write(server.replace(':', '_').replace('\\', '_'));
out.write("-deployment-details' style='display: none; border: 1px dotted #eee; margin-left: 14px; margin-top: 4px; padding:3px;'>");
out.write(content);
out.write("</div>");