Merged V3.0 to HEAD

11489: Added step for JDBC info
   11490: Fixed: ETHREEOH-452 Error appear when a user trying to view metadata for item, which is deleting
   11491: Blog integration package rename and removal of obsolete web-client beans
   11492: Adding missing web-extension dir to dynamic-website project
   11493: ETHREEOH_520: Fixes to prevent new users from being created when existing users invited to a site
   11494: Updated version to beta2
   11495: Fixes ETHREEOH-252, 392 & 393. When merged to 2.2 will also fix ETWOTWO-246 & 616 and when merged to HEAD will fix ALFCOM-1685 & 1712. 
   11496: Partial fix for ETHREEOH-27, fixes 2 out of the final 3 error conditions.
   11497: Fix for ETHREEOH-550

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12447 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-12-17 13:28:44 +00:00
parent 53079ed778
commit 992adcfec7
10 changed files with 23 additions and 644 deletions

View File

@@ -179,6 +179,10 @@ public class CreateDiscussionDialog extends CreateTopicDialog
tx = Repository.getUserTransaction(context);
tx.begin();
// remove this node from the breadcrumb if required
Node forumNode = this.navigator.getCurrentNode();
this.browseBean.removeSpaceFromBreadcrumb(forumNode);
// remove the discussable aspect from the node we were going to discuss!
// AWC-1519: removing the aspect that defines the child association now does the
// cascade delete so we no longer have to delete the child explicitly
@@ -186,10 +190,6 @@ public class CreateDiscussionDialog extends CreateTopicDialog
// commit the transaction
tx.commit();
// remove this node from the breadcrumb if required
Node forumNode = this.navigator.getCurrentNode();
this.browseBean.removeSpaceFromBreadcrumb(forumNode);
// clear action context
this.browseBean.setActionSpace(null);

View File

@@ -64,20 +64,12 @@ public class DeleteForumDialog extends DeleteSpaceDialog
{
// find out what the parent type of the node being deleted
Node node = this.browseBean.getActionSpace();
NodeRef parent = null;
ChildAssociationRef assoc = this.getNodeService().getPrimaryParent(node.getNodeRef());
if (assoc != null)
{
// get the parent node
NodeRef parent = assoc.getParentRef();
// get the association type
QName type = assoc.getTypeQName();
if (type.equals(ForumModel.ASSOC_DISCUSSION))
{
// if the association type is the 'discussion' association we
// need to remove the discussable aspect from the parent node
this.getNodeService().removeAspect(parent, ForumModel.ASPECT_DISCUSSABLE);
}
parent = assoc.getParentRef();
// if the parent type is a forum space then we need the dialog to go
// back to the forums view otherwise it will use the default of 'browse',
@@ -89,7 +81,23 @@ public class DeleteForumDialog extends DeleteSpaceDialog
}
}
return super.finishImpl(context, outcome);
// delete the forum itself
outcome = super.finishImpl(context, outcome);
// remove the discussable aspect if appropriate
if (assoc != null && parent != null)
{
// get the association type
QName type = assoc.getTypeQName();
if (type.equals(ForumModel.ASSOC_DISCUSSION))
{
// if the association type is the 'discussion' association we
// need to remove the discussable aspect from the parent node
this.getNodeService().removeAspect(parent, ForumModel.ASPECT_DISCUSSABLE);
}
}
return outcome;
}
@Override