|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.gdata.data.GDataAccount
public class GDataAccount
The GData-Server system provides acccount to be associated with registered feed. Every feed has an owner account. The account holder is automaticaly in role to modify his feeds. One account can own n feeds having m entries.
Additionally an account can be in role to modify other feeds, create accounts
or feeds. See GDataAccount.AccountRole
for detailed infomation about roles. One
account can also have more than one role. All roles in GDataAccount.AccountRole
can be combined
For each account values for author name, author email and author link can be
set at creation time or during an update. These values will be used as the
corresponding values for the feed
ServerBaseFeed.addAuthor(Person)
if no
value for the feed has be specified.
Nested Class Summary | |
---|---|
static class |
GDataAccount.AccountRole
This enum respesents all account roles an account can have. |
Constructor Summary | |
---|---|
GDataAccount()
Creates a new GDataAccount. |
Method Summary | |
---|---|
static GDataAccount |
createAdminAccount()
|
boolean |
equals(Object o)
|
URL |
getAuthorLink()
|
String |
getAuthorMail()
|
String |
getAuthorname()
|
String |
getName()
|
String |
getPassword()
|
Set<GDataAccount.AccountRole> |
getRoles()
|
int |
getRolesAsInt()
|
int |
hashCode()
|
static boolean |
isInRole(int intRole,
GDataAccount.AccountRole role)
checks whether the given integer matches the account role. |
boolean |
isUserInRole(GDataAccount.AccountRole role)
|
boolean |
requiredValuesSet()
Checks the requiered values for creating an account are set. |
void |
setAuthorLink(URL authorLink)
|
void |
setAuthorMail(String authorMail)
|
void |
setAuthorname(String authorname)
|
void |
setName(String name)
|
void |
setPassword(String password)
|
void |
setRole(GDataAccount.AccountRole role)
Adds the given role to the role list |
void |
setRolesAsInt(int i)
Sets the roles from a int representation. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GDataAccount()
GDataAccount.AccountRole.USER
will be set.
Method Detail |
---|
public String getPassword()
public void setPassword(String password)
password
- -
the account Passwordpublic String getName()
public void setName(String name)
name
- The name to set.public URL getAuthorLink()
public void setAuthorLink(URL authorLink)
authorLink
- -
the http link specified for the authorpublic String getAuthorMail()
public void setAuthorMail(String authorMail)
authorMail
- -
the authors mail addresspublic String getAuthorname()
public void setAuthorname(String authorname)
authorname
- -
the name specified as being the author namepublic void setRole(GDataAccount.AccountRole role)
role
- -
the role to add to the role listpublic Set<GDataAccount.AccountRole> getRoles()
public boolean isUserInRole(GDataAccount.AccountRole role)
role
- -
the role to check
true
if the role list contains the given rolepublic int getRolesAsInt()
setRolesAsInt(int)
public void setRolesAsInt(int i)
GDataAccount.AccountRole.USER
- int value 1GDataAccount.AccountRole.ENTRYAMINISTRATOR
-
int value 2GDataAccount.AccountRole.FEEDAMINISTRATOR
-
int value 4GDataAccount.AccountRole.USERADMINISTRATOR
-
int value 8GDataAccount.AccountRole.ENTRYAMINISTRATOR
and
GDataAccount.AccountRole.FEEDAMINISTRATOR
.
i
- -
the integer used to set the rolespublic boolean equals(Object o)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean requiredValuesSet()
true
if an only if password and name are not null
and the length is > 5public String toString()
toString
in class Object
Object.toString()
public static boolean isInRole(int intRole, GDataAccount.AccountRole role)
intRole
- - integer representation of a rolerole
- - the account role to match
true
if and only if the given roles match, otherwise false
public static final GDataAccount createAdminAccount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |