Package org.jasig.portal.security.provider

Examples of org.jasig.portal.security.provider.RestrictedPerson


   * @param personAttributes
   * @see org.jasig.portal.layout.IUserLayoutHelper#resetUserLayout(org.jasig.services.persondir.IPersonAttributes)
   */
  public void resetUserLayout(final IPersonAttributes personAttributes) {
    // Create an empty RestrictedPerson object
    RestrictedPerson person = PersonFactory.createRestrictedPerson();      

    // populate the person with the supplied attributes
    person.setAttributes(personAttributes.getAttributes());

    // get the integer uid into the person object without creating any new person data      
    int uid = userIdentityStore.getPortalUID( person, false );
    person.setID(uid);

    IUserLayoutStore userLayoutStore = UserLayoutStoreFactory.getUserLayoutStoreImpl();
    try {
      // determine user profile           
      UserProfile userProfile = userLayoutStore.getUserProfileByFname(person, DEFAULT_LAYOUT_FNAME);
View Full Code Here


     * @return <i>restricted</i> user
     */
    public static RestrictedPerson createRestrictedPerson() {
        IPerson person = createPerson();
       
        return new RestrictedPerson(person);
    }
View Full Code Here

         IPerson person = null;
         try {
             IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
             final IPersonAttributes personAttributes = pa.getPerson(member.getKey());

             RestrictedPerson rp = PersonFactory.createRestrictedPerson();
             if (personAttributes != null) {
                 rp.setAttributes(personAttributes.getAttributes());
             }
            
             person = rp;
         }
         catch (Exception ex) {
View Full Code Here

     * @deprecated Use {@link PersonFactory#createRestrictedPerson()} and
     * {@link IPersonAttributeDao#getUserAttributes(String)} and
     * {@link RestrictedPerson#setAttributes(Map)}
     */
    public static RestrictedPerson getRestrictedPerson(final String uid) {
        final RestrictedPerson rp = PersonFactory.createRestrictedPerson();
        final Map attributes = instance().impl.getUserAttributes(uid);
       
        rp.setAttributes(attributes);
       
        return rp;
    }
View Full Code Here

     * @return <i>restricted</i> user
     */
    public static RestrictedPerson createRestrictedPerson() {
        IPerson person = createPerson();
       
        return new RestrictedPerson(person);
    }
View Full Code Here

             { return false; }
         IPerson person = null;
         try {
             IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
             Map attrs = pa.getUserAttributes(member.getKey());
             RestrictedPerson rp = PersonFactory.createRestrictedPerson();
             rp.setAttributes(attrs);
            
             person = rp;
         }
         catch (Exception ex)
             { return false; }
View Full Code Here

   * @param personAttributes
   * @see org.jasig.portal.layout.IUserLayoutHelper#resetUserLayout(org.jasig.services.persondir.IPersonAttributes)
   */
  public void resetUserLayout(final IPersonAttributes personAttributes) {
    // Create an empty RestrictedPerson object
    RestrictedPerson person = PersonFactory.createRestrictedPerson();      

    // populate the person with the supplied attributes
    person.setAttributes(personAttributes.getAttributes());

    // get the integer uid into the person object without creating any new person data      
    int uid = userIdentityStore.getPortalUID( person, false );
    person.setID(uid);

    IUserLayoutStore userLayoutStore = UserLayoutStoreLocator.getUserLayoutStore();
    try {
      // determine user profile           
      IUserProfile userProfile = userLayoutStore.getUserProfileByFname(person, DEFAULT_LAYOUT_FNAME);
View Full Code Here

        if (StringUtils.isBlank(fragmentOwnerName)) {
            log.warn("Attempted to subscribe to tab with null owner ID");
            response.sendError(HttpServletResponse.SC_BAD_REQUEST);
            return null;
        }
        RestrictedPerson fragmentOwner = PersonFactory.createRestrictedPerson();
        fragmentOwner.setUserName(fragmentOwnerName);

        // 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.
View Full Code Here

        // get the fragment owner's ID from the element string
        String userIdString = StringUtils.substringBetween(elementId, Constants.FRAGMENT_ID_USER_PREFIX, Constants.FRAGMENT_ID_LAYOUT_PREFIX);
        int userId = NumberUtils.toInt(userIdString,0);

        // construct a new person object representing the fragment owner
        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
View Full Code Here

         IPerson person = null;
         try {
             IPersonAttributeDao pa = PersonAttributeDaoLocator.getPersonAttributeDao();
             final IPersonAttributes personAttributes = pa.getPerson(member.getKey());

             RestrictedPerson rp = PersonFactory.createRestrictedPerson();
             if (personAttributes != null) {
                 rp.setAttributes(personAttributes.getAttributes());
             }
            
             person = rp;
         }
         catch (Exception ex) {
View Full Code Here

TOP

Related Classes of org.jasig.portal.security.provider.RestrictedPerson

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.