|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.api.profile.Profile
public class Profile
Class to represent a user of the webapp
| Field Summary | |
|---|---|
protected ProfileManager |
manager
|
protected java.lang.String |
password
|
protected java.util.Map |
queryHistory
|
protected java.util.Map<java.lang.String,InterMineBag> |
savedBags
|
protected java.util.Map<java.lang.String,SavedQuery> |
savedQueries
|
protected java.util.Map<java.lang.String,TemplateQuery> |
savedTemplates
|
protected java.lang.Integer |
userId
|
protected java.lang.String |
username
|
| Constructor Summary | |
|---|---|
Profile(ProfileManager manager,
java.lang.String username,
java.lang.Integer userId,
java.lang.String password,
java.util.Map<java.lang.String,SavedQuery> savedQueries,
java.util.Map<java.lang.String,InterMineBag> savedBags,
java.util.Map<java.lang.String,TemplateQuery> savedTemplates)
Construct a Profile |
|
| Method Summary | |
|---|---|
InterMineBag |
createBag(java.lang.String name,
java.lang.String type,
java.lang.String description)
Create a bag and save it to the userprofile database. |
void |
deleteBag(java.lang.String name)
Delete a bag from the user account, if user is logged in also deletes from the userprofile database. |
void |
deleteHistory(java.lang.String name)
Remove an item from the query history. |
void |
deleteQuery(java.lang.String name)
Delete a query |
void |
deleteTemplate(java.lang.String name)
Delete a template |
void |
disableSaving()
Disable saving until enableSaving() is called. |
void |
enableSaving()
Re-enable saving when saveTemplate(), deleteQuery() etc. are called. |
java.util.Map<java.lang.String,SavedQuery> |
getHistory()
Get the session query history. |
java.lang.String |
getPassword()
Get the value of password |
ProfileManager |
getProfileManager()
Return the ProfileManager that was passed to the constructor. |
java.util.Map<java.lang.String,InterMineBag> |
getSavedBags()
Get the value of savedBags |
java.util.Map<java.lang.String,SavedQuery> |
getSavedQueries()
Get the value of savedQueries |
java.util.Map<java.lang.String,TemplateQuery> |
getSavedTemplates()
Get the users saved templates |
SearchRepository |
getSearchRepository()
Get the SearchRepository for this Profile. |
TemplateQuery |
getTemplate(java.lang.String name)
get a template |
java.lang.Integer |
getUserId()
Get the value of userId |
java.lang.String |
getUsername()
Get the value of username |
java.util.Map<java.lang.String,? extends WebSearchable> |
getWebSearchablesByType(java.lang.String type)
Return a WebSearchable Map for the given type. |
boolean |
isLoggedIn()
Return true if and only if the user is logged is (and the Profile will be written to the userprofile). |
void |
renameBag(java.lang.String oldName,
java.lang.String newName)
Rename an existing bag, throw exceptions when bag doesn't exist of if new name already exists. |
void |
renameHistory(java.lang.String oldName,
java.lang.String newName)
Rename an item in the history. |
void |
saveBag(java.lang.String name,
InterMineBag bag)
Stores a new bag in the profile. |
void |
saveHistory(SavedQuery query)
Save a query to the query history. |
void |
saveQuery(java.lang.String name,
SavedQuery query)
Save a query |
void |
saveTemplate(java.lang.String name,
TemplateQuery template)
Save a template |
void |
setUserId(java.lang.Integer userId)
Set the userId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ProfileManager manager
protected java.lang.String username
protected java.lang.Integer userId
protected java.lang.String password
protected java.util.Map<java.lang.String,SavedQuery> savedQueries
protected java.util.Map<java.lang.String,InterMineBag> savedBags
protected java.util.Map<java.lang.String,TemplateQuery> savedTemplates
protected java.util.Map queryHistory
| Constructor Detail |
|---|
public Profile(ProfileManager manager,
java.lang.String username,
java.lang.Integer userId,
java.lang.String password,
java.util.Map<java.lang.String,SavedQuery> savedQueries,
java.util.Map<java.lang.String,InterMineBag> savedBags,
java.util.Map<java.lang.String,TemplateQuery> savedTemplates)
manager - the manager for this profileusername - the username for this profileuserId - the id of this userpassword - the password for this profilesavedQueries - the saved queries for this profilesavedBags - the saved bags for this profilesavedTemplates - the saved templates for this profile| Method Detail |
|---|
public ProfileManager getProfileManager()
public java.lang.String getUsername()
public boolean isLoggedIn()
public java.lang.Integer getUserId()
public void setUserId(java.lang.Integer userId)
userId - an Integerpublic java.lang.String getPassword()
public void disableSaving()
public void enableSaving()
public java.util.Map<java.lang.String,TemplateQuery> getSavedTemplates()
public void saveTemplate(java.lang.String name,
TemplateQuery template)
name - the template nametemplate - the templatepublic TemplateQuery getTemplate(java.lang.String name)
name - the template
public void deleteTemplate(java.lang.String name)
name - the template namepublic java.util.Map<java.lang.String,SavedQuery> getSavedQueries()
public void saveQuery(java.lang.String name,
SavedQuery query)
name - the query namequery - the querypublic void deleteQuery(java.lang.String name)
name - the query namepublic java.util.Map<java.lang.String,SavedQuery> getHistory()
public void saveHistory(SavedQuery query)
query - the SavedQuery to save to the historypublic void deleteHistory(java.lang.String name)
name - the of the SavedQuery from the history
public void renameHistory(java.lang.String oldName,
java.lang.String newName)
oldName - the name of the old itemnewName - the new namepublic java.util.Map<java.lang.String,InterMineBag> getSavedBags()
public void saveBag(java.lang.String name,
InterMineBag bag)
name - the name of the bagbag - the InterMineBag object
public InterMineBag createBag(java.lang.String name,
java.lang.String type,
java.lang.String description)
throws ObjectStoreException
name - the bag nametype - the bag typedescription - the bag description
ObjectStoreException - if something goes wrong
public void deleteBag(java.lang.String name)
throws ObjectStoreException
name - the bag name
ObjectStoreException - if problems deleting bag
public void renameBag(java.lang.String oldName,
java.lang.String newName)
throws ObjectStoreException
oldName - the bag to renamenewName - new name for the bag
ObjectStoreException - if problems storingpublic java.util.Map<java.lang.String,? extends WebSearchable> getWebSearchablesByType(java.lang.String type)
type - the type (from TagTypes)
public SearchRepository getSearchRepository()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||