001/** 002 * Copyright 2011-2013 The Kuali Foundation Licensed under the 003 * Educational Community License, Version 2.0 (the "License"); you may 004 * not use this file except in compliance with the License. You may 005 * obtain a copy of the License at 006 * 007 * http://www.osedu.org/licenses/ECL-2.0 008 * 009 * Unless required by applicable law or agreed to in writing, 010 * software distributed under the License is distributed on an "AS IS" 011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 012 * or implied. See the License for the specific language governing 013 * permissions and limitations under the License. 014 */ 015package org.kuali.mobility.security.user.api; 016 017import org.kuali.mobility.security.group.api.Group; 018import org.kuali.mobility.security.user.entity.UserAttribute; 019 020import java.util.List; 021 022/** 023 * @author Kuali Mobility Team (mobility.collab@kuali.org) 024 */ 025public interface User { 026 boolean isPublicUser(); 027 028 Long getId(); 029 030 void setLoginName(String loginName); 031 032 String getLoginName(); 033 034 void setPassword(String password); 035 036 String getPassword(); 037 038 String getDisplayName(); 039 040 void setDisplayName(String displayName); 041 042 String getFirstName(); 043 044 void setFirstName(String firstName); 045 046 String getLastName(); 047 048 void setLastName(String lastName); 049 050 void invalidateUser(); 051 052 void setRequestURL(String url); 053 054 String getRequestURL(); 055 056 boolean isMember(String groupName); 057 058 String getViewCampus(); 059 060 void setViewCampus(String viewCampus); 061 062 String getEmail(); 063 064 void setEmail(String email); 065 066 List<Group> getGroups(); 067 068 void setGroups(List<Group> groups); 069 070 void addGroup(Group group); 071 072 boolean removeGroup(Group group); 073 074 boolean attributeExists(String key, String value); 075 076 void addAttribute(String name, String value); 077 078 void clearAttribute(String name); 079 080 List<UserAttribute> getAttribute(String name); 081 082 List<String> getAttributeNames(); 083 084 List<UserAttribute> getAttributes(); 085 086 void setAttributes(List<UserAttribute> attributes); 087 088 boolean removeAttribute(String name, String value); 089 090 boolean removeAttribute(String name); 091 092 void clearAttributes(); 093}