. Fix for missing image issue spotted by Linton

. Code cleanup (syncing of code styles, tabs, missing "if (logger.isDebugEnabled())" calls…)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5008 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-02-02 09:03:38 +00:00
parent bbba9d10cd
commit 0f04450926
8 changed files with 93 additions and 111 deletions

View File

@@ -167,6 +167,7 @@ public class AVMBrowseBean implements IContextListener
UIContextService.getInstance(FacesContext.getCurrentInstance()).registerBean(this);
}
// ------------------------------------------------------------------------------
// Bean property getters and setters

View File

@@ -761,5 +761,4 @@ public final class AVMConstants
private final static Pattern SANDBOX_RELATIVE_PATH_PATTERN =
Pattern.compile("([^:]+:/" + JNDIConstants.DIR_DEFAULT_WWW +
"/" + JNDIConstants.DIR_DEFAULT_APPBASE + ")(.*)");
}

View File

@@ -226,6 +226,7 @@ public class CreateWebContentWizard extends BaseContentWizard
final int step = Application.getWizardManager().getCurrentStep();
if (step == 2)
{
if (LOGGER.isDebugEnabled())
LOGGER.debug("clearing form instance data");
if (this.formInstanceData != null)
{
@@ -302,14 +303,15 @@ public class CreateWebContentWizard extends BaseContentWizard
// reset all paths and structures to the main store
this.createdPath = AVMConstants.getCorrespondingPathInMainStore(this.createdPath);
if (LOGGER.isDebugEnabled())
LOGGER.debug("reset path " + this.createdPath + " to main store");
boolean form = (MimetypeMap.MIMETYPE_XML.equals(this.mimeType) && this.formName != null);
if (form)
{
this.formInstanceData = new FormInstanceDataImpl(AVMNodeConverter.ToNodeRef(-1, this.createdPath));
this.renditions = this.formInstanceData.getRenditions();
if (LOGGER.isDebugEnabled())
LOGGER.debug("reset form instance data " + this.formInstanceData.getName() +
" and " + this.renditions.size() + " to main store");
}
@@ -367,9 +369,9 @@ public class CreateWebContentWizard extends BaseContentWizard
srcPaths.add(AVMConstants.getCorrespondingPath(this.createdPath, sandboxName));
}
if (LOGGER.isDebugEnabled())
LOGGER.debug("creating workflow package with " + srcPaths.size() + " files");
// Create workflow sandbox for workflow package
SandboxInfo sandboxInfo = SandboxFactory.createWorkflowSandbox(storeId);

View File

@@ -122,6 +122,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
/** Data for virtualization server notification */
private SandboxInfo sandboxInfo;
// ------------------------------------------------------------------------------
// Wizard implementation
@@ -212,28 +213,25 @@ public class CreateWebsiteWizard extends BaseWizardBean
return outcome;
}
/**
* @see org.alfresco.web.bean.dialog.BaseDialogBean#doPostCommitProcessing(javax.faces.context.FacesContext, java.lang.String)
*/
@Override
protected String doPostCommitProcessing(FacesContext context, String outcome)
{
// TODO: ask about isStandalone()
// in InviteWebsiteUsersWizard
if (this.sandboxInfo != null)
{
String newStoreName =
AVMConstants.buildStagingStoreName( sandboxInfo.getMainStoreName());
// update the virtualisation server with the default ROOT webapp path
// performed after the main txn has committed successfully
String newStoreName = AVMConstants.buildStagingStoreName(sandboxInfo.getMainStoreName());
String path = AVMConstants.buildStoreWebappPath(
newStoreName, "ROOT"
);
String path = AVMConstants.buildStoreWebappPath(newStoreName, WEBAPP_DEFAULT);
AVMConstants.updateVServerWebapp(path, true);
}
return outcome;
}
/**
* Persist the forms, templates, workflows and workflow defaults to the model for this web project
*

View File

@@ -197,7 +197,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
/**
* Handle notification to the virtualization server
* (this needs to occur after the sandbox is created).
* (this needs to occur after the sandbox is created in the main txn).
*/
@Override
protected String doPostCommitProcessing(FacesContext context, String outcome)
@@ -207,12 +207,10 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
{
for (SandboxInfo sandboxInfo : this.sandboxInfoList)
{
String newlyInvitedStoreName =
AVMConstants.buildStagingStoreName(
String newlyInvitedStoreName = AVMConstants.buildStagingStoreName(
sandboxInfo.getMainStoreName());
String path =
AVMConstants.buildStoreWebappPath(
String path = AVMConstants.buildStoreWebappPath(
newlyInvitedStoreName, this.avmBrowseBean.getWebapp());
AVMConstants.updateVServerWebapp(path, true);
@@ -221,8 +219,6 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
return outcome;
}
/**
* Find all nested user authorities contained with an authority
*

View File

@@ -465,8 +465,6 @@ public final class SandboxFactory
new PropertyValue(DataTypeDefinition.INT, distance));
}
/**
* Debug helper method to dump the properties of a store
*

View File

@@ -88,7 +88,6 @@ public class SubmitDialog extends BaseDialogBean
private Map<String, FormWorkflowWrapper> formWorkflowMap;
private List<UIListItem> workflowItems;
// The virtualization server might need to be notified
// because one or more of the files submitted could alter
// the behavior the virtual webapp in the target of the submit.
@@ -97,7 +96,6 @@ public class SubmitDialog extends BaseDialogBean
// This must take place after the transaction has been completed;
// therefore, a variable is needed to store the path to the
// updated webapp so it can happen in doPostCommitProcessing.
//
private String virtUpdatePath;
protected AVMService avmService;
@@ -247,7 +245,6 @@ public class SubmitDialog extends BaseDialogBean
{
// Example srcPath:
// mysite--alice:/www/avm_webapps/ROOT/foo.txt
String srcPath = wrapper.getDescriptor().getPath();
// We *always* want to update virtualization server
@@ -266,7 +263,6 @@ public class SubmitDialog extends BaseDialogBean
// the submiot list (even if it's not in WEB-INF),
// and force the virt server notification after the
// transaction has completed via doPostCommitProcessing.
if (this.virtUpdatePath == null)
{
// Example workflow main store name:
@@ -277,12 +273,9 @@ public class SubmitDialog extends BaseDialogBean
// except that it belongs to a the main store of
// the workflow sandbox instead of the sandbox
// that originated the submit.
this.virtUpdatePath = workflowMainStoreName +
srcPath.substring(
srcPath.indexOf(':'),
srcPath.length()
);
this.virtUpdatePath =
workflowMainStoreName +
srcPath.substring(srcPath.indexOf(':'),srcPath.length());
}
srcPaths.add(srcPath);
@@ -300,8 +293,6 @@ public class SubmitDialog extends BaseDialogBean
params.put(WorkflowModel.ASSOC_PACKAGE, workflowPackage);
// add submission parameters
params.put(WorkflowModel.PROP_WORKFLOW_DESCRIPTION, getComment());
params.put(AVMWorkflowUtil.PROP_LABEL, getLabel());
@@ -336,7 +327,7 @@ public class SubmitDialog extends BaseDialogBean
List<AVMDifference> diffs = new ArrayList<AVMDifference>(items.size());
// flag indicating if virt server update is already implied
boolean update_vserver = false;
boolean updateVserver = false;
for (ItemWrapper wrapper : items)
{
@@ -348,17 +339,17 @@ public class SubmitDialog extends BaseDialogBean
// If nothing has required notifying the virtualization server
// so far, check to see if destPath forces a notification
// (e.g.: it might be a path to a jar file within WEB-INF/lib).
if ( ! update_vserver )
if (!updateVserver)
{
// Examples of destPath that require virt server notification:
//
// mysite:/www/avm_webapps/ROOT/WEB-INF/web.xml
// mysite:/www/avm_webapps/ROOT/WEB-INF/lib/moo.jar
update_vserver = VirtServerUtils.requiresUpdateNotification( destPath );
if ( update_vserver ) { this.virtUpdatePath = destPath; }
updateVserver = VirtServerUtils.requiresUpdateNotification( destPath );
if (updateVserver)
{
this.virtUpdatePath = destPath;
}
}
}
@@ -380,20 +371,17 @@ public class SubmitDialog extends BaseDialogBean
{
// Force the update because we've already determined
// that update_path requires virt server notification.
if (this.virtUpdatePath != null)
{
// Examples of destPath that require virt server notification:
//
// mysite:/www/avm_webapps/ROOT/WEB-INF/web.xml
// mysite:/www/avm_webapps/ROOT/WEB-INF/lib/moo.jar
AVMConstants.updateVServerWebapp(this.virtUpdatePath, true);
}
return outcome;
}
/**
* @see org.alfresco.web.bean.dialog.BaseDialogBean#getFinishButtonDisabled()
*/

View File

@@ -102,7 +102,7 @@
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_6.gif" width="4" height="9"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- infomation panel --%>