{
JetspeedServiceLocator locator = ((AbstractAdminWebApplication) getApplication()).getServiceLocator();
PortletRegistry registry = locator.getPortletRegistry();
ApplicationServerManager asm = locator.getApplicationServerManager();
AuditActivity auditActivity = locator.getAuditActivity();
PortletApplicationManagement pam = locator.getPortletApplicationManager();
ApplicationBean pab = (ApplicationBean) model.getObject();
PortletApplication pa = registry.getPortletApplication(pab.getApplicationName());
FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
if (isServerReady(asm, feed, "remove from registry", pa, pab))
{
try
{
pam.unregisterPortletApplication(pa.getName());
StringResourceModel resModel = new StringResourceModel("pam.details.action.status.deleteOK", this, null, new Object [] { pab.getPath() } );
feed.info(resModel.getString());
auditActivity.logAdminRegistryActivity(
((AbstractAdminWebApplication) getApplication()).getUserPrincipalName(),
((AbstractAdminWebApplication) getApplication()).getIPAddress(),