use of org.apereo.portal.security.provider.PersonImpl in project uPortal by Jasig.
the class ProfileSelectionEventTest method setUp.
@Before
public void setUp() {
initMocks(this);
person = new PersonImpl();
person.setID(1);
differentPerson = new PersonImpl();
differentPerson.setID(2);
samePerson = new PersonImpl();
samePerson.setID(1);
}
use of org.apereo.portal.security.provider.PersonImpl in project uPortal by Jasig.
the class ServerNameGuestChainingProfileMapperTest method createGuestPerson.
protected static IPerson createGuestPerson() throws Exception {
IPerson person = new PersonImpl();
person.setAttribute(IPerson.USERNAME, "guest");
return person;
}
use of org.apereo.portal.security.provider.PersonImpl in project uPortal by Jasig.
the class FragmentActivator method bindToOwner.
private IPerson bindToOwner(FragmentDefinition fragment) {
IPerson owner = new PersonImpl();
owner.setAttribute("username", fragment.getOwnerId());
int userID = -1;
try {
userID = identityStore.getPortalUID(owner, false);
} catch (AuthorizationException ae) {
// current implementation of RDMBUserIdentityStore throws an
// auth exception if the user doesn't exist even if
// create data is false as we have it here. So this exception
// can be discarded since we check for the userID being -1
// meaning that the user wasn't found to trigger creating
// that user.
}
if (userID == -1) {
userID = createOwner(owner, fragment);
owner.setAttribute(NEWLY_CREATED_ATTR, "" + (userID != -1));
}
owner.setID(userID);
return owner;
}
use of org.apereo.portal.security.provider.PersonImpl in project uPortal by Jasig.
the class FragmentActivator method loadPreferences.
private void loadPreferences(UserView view, FragmentDefinition fragment) {
// if fragment not bound to user can't return any preferences.
if (view.getUserId() == -1)
return;
IPerson p = new PersonImpl();
p.setID(view.getUserId());
p.setAttribute("username", fragment.getOwnerId());
}
use of org.apereo.portal.security.provider.PersonImpl in project uPortal by Jasig.
the class InjectAttributeRegexTesterTest method getIPerson.
/** @return org.apereo.portal.groups.IEntity */
private IPerson getIPerson(String key) {
IPerson ip = new PersonImpl();
ip.setAttribute(IPerson.USERNAME, key);
return ip;
}
Aggregations