Examples of IUserFragmentSubscription


Examples of org.jasig.portal.fragment.subscribe.IUserFragmentSubscription

          final IPerson fragmentPerson = getPerson(fragmentOwner, false);
          if (fragmentPerson == null) {
              throw new IllegalArgumentException("No fragmentOwner " + fragmentOwner + " exists to subscribe to, be sure to import all fragment owners first");
          }
         
          final IUserFragmentSubscription userFragmentSubscription = this.userFragmentSubscriptionDao.getUserFragmentInfo(person, fragmentPerson);
          if (userFragmentSubscription == null) {
              this.userFragmentSubscriptionDao.createUserFragmentInfo(person, fragmentPerson);
          }
        }
  }
View Full Code Here

Examples of org.jasig.portal.fragment.subscribe.IUserFragmentSubscription

    }
   
    @Override
    @PortalTransactional
    public IUserFragmentSubscription createUserFragmentInfo(IPerson person, IPerson fragmentOwner) {
        final IUserFragmentSubscription userFragmentInfo = new UserFragmentSubscriptionImpl(person, fragmentOwner);
        this.getEntityManager().persist(userFragmentInfo);

        return userFragmentInfo;
    }
View Full Code Here

Examples of org.jasig.portal.fragment.subscribe.IUserFragmentSubscription

        // Mark the currently-authenticated user as subscribed to this fragment.
        // If an inactivated fragment registration already exists, update it
        // as an active subscription.  Otherwise, create a new fragment
        // subscription.
        IUserFragmentSubscription userFragmentInfo = userFragmentInfoDao
            .getUserFragmentInfo(per, fragmentOwner);
        if (userFragmentInfo == null) {
            userFragmentInfo = userFragmentInfoDao.createUserFragmentInfo(per,
                    fragmentOwner);
        } else {
            userFragmentInfo.setActive(true);
            userFragmentInfoDao.updateUserFragmentInfo(userFragmentInfo);
        }

        try {
            // reload user layout and stylesheet to incorporate new DLM fragment
View Full Code Here

Examples of org.jasig.portal.fragment.subscribe.IUserFragmentSubscription

        RestrictedPerson fragmentOwner = PersonFactory.createRestrictedPerson();
        fragmentOwner.setID(userId);
        fragmentOwner.setUserName(userIdentityStore.getPortalUserName(userId));

        // attempt to find a subscription for this fragment
        IUserFragmentSubscription subscription = userFragmentInfoDao.getUserFragmentInfo(per, fragmentOwner);

        // if a subscription was found, remove it's registration
        if (subscription != null) {
            userFragmentInfoDao.deleteUserFragmentInfo(subscription);
            ulm.loadUserLayout(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.