Package org.jasig.portal

Examples of org.jasig.portal.ChannelStaticData


    public void testReceiveEvent() {
        this.cThrower.receiveEvent(PortalEvent.SESSION_DONE_EVENT);
    }

    public void testSetStaticData() {
        this.cThrower.setStaticData(new ChannelStaticData());
    }
View Full Code Here


          ;
        }

      try {
        servant = getGroupsServant();
        ChannelStaticData slaveSD = cloneStaticData(staticData);
        servant.setStaticData(slaveSD);
        if (typeKey!=null){
          servant.getSessionData().rootViewGroupID = Utility.translateKeytoID(typeKey,servant.getSessionData().getUnrestrictedData());
        }
        servant.getSessionData().highlightedGroupID = servant.getSessionData().rootViewGroupID;
View Full Code Here

      CGroupsManagerServant servant;
      try {
        ILockableEntityGroup lockedGroup = GroupService.findLockableGroup(groupKey,staticData.getAuthorizationPrincipal().getPrincipalString());
        lockedGroup.getClass();
        servant = getGroupsServant();
        ChannelStaticData slaveSD = cloneStaticData(staticData);

        ((IChannel)servant).setStaticData(slaveSD);
        servant.getSessionData().mode = MEMBERS_ONLY_MODE;
        servant.getSessionData().lockedGroup = lockedGroup;
        servant.getSessionData().highlightedGroupID = Utility.translateKeytoID(groupKey,servant.getSessionData().getUnrestrictedData());
View Full Code Here

                        + String.valueOf((time2 - time1)) + " ms to instantiate add/remove servant");
        return (IServant) servant;
    }

    protected static ChannelStaticData cloneStaticData(ChannelStaticData sd){
        ChannelStaticData rsd = (ChannelStaticData) sd.clone();
        Enumeration srd = rsd.keys();
        while (srd.hasMoreElements()) {
            rsd.remove(srd.nextElement());
        }
        return rsd;
    }
View Full Code Here

      long time1 = System.currentTimeMillis();
      CGroupsManagerServant servant;

      try {
        servant = getGroupsServant();
        ChannelStaticData slaveSD =  cloneStaticData(staticData);
        Utility.logMessage("DEBUG", "CGroupsManagerFactory::getGroupsServantforSelection: slaveSD before setting servant static data: " + slaveSD);
        servant.setStaticData(slaveSD);

        servant.getSessionData().mode = "select";
        servant.getSessionData().allowFinish = allowFinish;
View Full Code Here

    * True when the servant is ready to pass control back to the master channel.
    * @return boolean
    */
   public boolean isFinished () {
      CGroupsManagerSessionData sessionData = getSessionData();
      ChannelStaticData staticData = sessionData.staticData;
      boolean isFinished = false;
      if (staticData.containsKey("groupManagerFinished") && staticData.getParameter("groupManagerFinished").equals("true")) {
         isFinished = true;
      }
      return  isFinished;
   }
View Full Code Here

    * Note that these are IGroupMembers !!
    * @return Object[]
    */
   public Object[] getResults () {
      CGroupsManagerSessionData sessionData = getSessionData();
      ChannelStaticData staticData = sessionData.staticData;
      IGroupsManagerCommand cmd = GroupsManagerCommandFactory.get("Done");
      try{
         cmd.execute(sessionData);
      }
      catch(Exception e){
         Utility.logMessage("ERROR", e.toString(), e);
         sessionData.feedback = "Error executing command Done: "+e.getMessage();
      }
      Object[] results = (Object[])staticData.get("princResults");
      if (results == null){
        results = new IGroupMember[0];
      }
      Utility.logMessage("DEBUG", "CGroupsManagerservant.getResults()");
      return  results;
View Full Code Here

    * This is the public method
    * @param sessionData
    * @throws Exception
    */
   public void execute (CGroupsManagerSessionData sessionData) throws Exception{
      ChannelStaticData staticData = sessionData.staticData;
      ChannelRuntimeData runtimeData= sessionData.runtimeData;

      Document model = getXmlDoc(sessionData);
      Utility.logMessage("DEBUG", "EditGroup::execute(): Start");
      String parentElemId = getCommandArg(runtimeData);
      // if not IPerson group, then set view root to root for requested type

      String userID = getUserID(sessionData);
      //String userName = GroupsManagerXML.getEntityName(ENTITY_CLASSNAME, userID);
      String userKey = sessionData.user.getEntityIdentifier().getKey();
      String lockKey = userID + "::" + userKey;
      Utility.logMessage("DEBUG", "EditGroup::execute(): lockKey = " + lockKey);
      Element parentElem = GroupsManagerXML.getElementById(model, parentElemId);
      String parentKey = parentElem.getAttribute("key");
      ILockableEntityGroup lockedGroup = GroupService.findLockableGroup(parentKey, lockKey);
      // if lockedGroup is null, an exception has probably already been thrown
      if (lockedGroup != null){
         GroupsManagerXML.refreshAllNodesRecursivelyIfRequired(sessionData.getUnrestrictedData(), parentElem);
         // store in sessionData
         sessionData.lockedGroup=lockedGroup;
         sessionData.mode = EDIT_MODE;
         staticData.setParameter("groupParentId", parentElemId);
      }

      Utility.logMessage("DEBUG", "EditGroup::execute(): Uid of parent element = " +
            parentElemId);
   }
View Full Code Here

     */
    @Override
    protected void setUp() throws Exception {
        this.portletAdaptor = new CSpringPortletAdaptor();
        this.portletChannel = EasyMock.createMock(ISpringPortletChannel.class);
        this.sd = new ChannelStaticData();
    }
View Full Code Here

    * @return ChannelCacheKey
    */
   public ChannelCacheKey generateKey () {
      Utility.logMessage("DEBUG", this.getClass().getName() + "::generateKey(): this = " + this);
      CGroupsManagerSessionData sessionData = getSessionData();
      ChannelStaticData staticData = sessionData.staticData;
      ChannelCacheKey cck;
      if (sessionData.servantChannel == null) {
         cck = new ChannelCacheKey();
         cck.setKey(staticData.getChannelPublishId()
            + "-"+staticData.getChannelSubscribeId()
            + "-" + String.valueOf(staticData.getPerson().getID()));
         //   + "-" + Calendar.getInstance().getTime().getTime()));
         cck.setKeyValidity(vKey());
         Utility.logMessage("DEBUG", "CGroupsManager.generateKey():: [NO SERVANT] key = " + cck.getKey());
      }
      else {
View Full Code Here

TOP

Related Classes of org.jasig.portal.ChannelStaticData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.