- 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

@@ -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>");