1 23 24 package org.infoglue.cms.applications.publishingtool.actions; 25 26 import java.util.List ; 27 28 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction; 29 import org.infoglue.cms.controllers.kernel.impl.simple.RepositoryController; 30 import org.infoglue.cms.util.ChangeNotificationController; 31 import org.infoglue.cms.util.NotificationMessage; 32 import org.infoglue.cms.util.RemoteCacheUpdater; 33 34 39 40 public class ViewPublishingToolStartPageAction extends InfoGlueAbstractAction 41 { 42 private static final long serialVersionUID = 1L; 43 44 private List repositories; 45 46 public String doExecute() throws Exception  47 { 48 this.repositories = RepositoryController.getController().getAuthorizedRepositoryVOList(this.getInfoGluePrincipal(), false); 49 50 return "success"; 51 } 52 53 public String doPushSystemNotificationMessages() throws Exception  54 { 55 NotificationMessage notificationMessage = null; 56 List messages = RemoteCacheUpdater.getSystemNotificationMessages(); 57 synchronized(messages) 58 { 59 if(messages.size() > 0) 60 notificationMessage = (NotificationMessage)messages.get(0); 61 } 62 63 if(notificationMessage != null) 64 { 65 notificationMessage = new NotificationMessage("ViewPublishingToolStartPageAction.doPushSystemNotificationMessages():", "" + notificationMessage.getClassName(), this.getInfoGluePrincipal().getName(), NotificationMessage.SYSTEM, notificationMessage.getObjectId(), notificationMessage.getObjectName()); 66 ChangeNotificationController.getInstance().addNotificationMessage(notificationMessage); 67 RemoteCacheUpdater.clearSystemNotificationMessages(); 68 } 69 70 return doExecute(); 71 } 72 73 public List getRepositories() 74 { 75 return this.repositories; 76 } 77 78 public List getSystemNotificationMessages() 79 { 80 return RemoteCacheUpdater.getSystemNotificationMessages(); 81 } 82 } 83 | Popular Tags |