| Modifier and Type | Class and Description |
|---|---|
static class |
SocialUserProfileDocument.ColleagueData
A colleague object.
|
| Constructor and Description |
|---|
SocialUserProfileDocument(java.lang.String collectionName)
Constructor takes collectionName as parameter for the user profile
document.
|
| Modifier and Type | Method and Description |
|---|---|
Property |
findProperty(java.lang.String name)
Finds a
Property by name. |
java.util.List<Value> |
getAskmeAbout()
Gets topics user can be asked about.
|
java.util.List<SocialUserProfileDocument.ColleagueData> |
getColleagues()
Gets list of colleagues.
|
Value |
getColleagueXml()
Gets colleague list as XML of the form below:
|
Value |
getOrgUrl()
Gets organization URL of the user.
|
java.util.List<Value> |
getPastProjects()
Gets user's past projects.
|
Value |
getPictureUrl()
Gets URL of the profile picture.
|
java.util.List<Value> |
getProperty(java.lang.String name)
Gets a list of values for a property, the list may be null.
|
java.util.Set<java.lang.String> |
getPropertyNames()
Gets the set of names of all
Properties in this
Document. |
boolean |
getPublic()
Gets whether profile is public.
|
java.util.List<Value> |
getSkills()
Gets skills of user.
|
Value |
getUserContent()
Gets user content which is typically a description of the user in his/her
own words.
|
Value |
getUserKey()
Gets user's unique identity.
|
void |
setAskmeAbout(java.util.List<java.lang.String> askmeAbout)
Sets topics user can be asked about.
|
void |
setColleagues(java.util.List<SocialUserProfileDocument.ColleagueData> colleagues)
Sets list of colleagues of user.
|
void |
setOrgUrl(java.lang.String orgUrl)
Sets organization URL of the user.
|
void |
setPastProjects(java.util.List<java.lang.String> values)
Sets user's past projects.
|
void |
setPictureUrl(java.lang.String pictureUrl)
Sets URL of the profile picture of user.
|
void |
setProperty(java.lang.String name,
java.util.List<java.lang.String> values)
Sets a list of values to a property (maybe beyond the distinguished
properties).
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets a single value to a property.
|
void |
setPublic(boolean isPublic)
Sets whether the profile is public or not.
|
void |
setSkills(java.util.List<java.lang.String> skillText)
Sets skill set of user.
|
void |
setUserContent(java.lang.String userContent)
Sets user content: typically a description of user in own words.
|
void |
setUserKey(java.lang.String userKey)
Sets user's unique identity.
|
public SocialUserProfileDocument(java.lang.String collectionName)
collectionName - name of collection where the profile document needs
to gopublic Value getUserContent()
public void setUserContent(java.lang.String userContent)
userContent - user contentpublic void setSkills(java.util.List<java.lang.String> skillText)
skillText - skillspublic java.util.List<Value> getSkills()
public void setAskmeAbout(java.util.List<java.lang.String> askmeAbout)
askmeAbout - topics user can be asked aboutpublic java.util.List<Value> getAskmeAbout()
public void setPastProjects(java.util.List<java.lang.String> values)
values - projects user worked in the pastpublic java.util.List<Value> getPastProjects()
public void setPublic(boolean isPublic)
isPublic - true if the profile is publicpublic boolean getPublic()
public Value getUserKey()
public void setUserKey(java.lang.String userKey)
userKey - unique key identifying a userpublic void setProperty(java.lang.String name,
java.util.List<java.lang.String> values)
name - name of user profile propertyvalues - list of values of propertypublic void setProperty(java.lang.String name,
java.lang.String value)
name - name of propertyvalue - value of propertypublic java.util.List<Value> getProperty(java.lang.String name)
name - name of propertypublic void setPictureUrl(java.lang.String pictureUrl)
pictureUrl - URL with the profile picture of userpublic Value getPictureUrl()
public void setOrgUrl(java.lang.String orgUrl)
orgUrl - URL of user's organizationpublic Value getOrgUrl()
public void setColleagues(java.util.List<SocialUserProfileDocument.ColleagueData> colleagues) throws RepositoryException
Contacts.xsd.colleagues - list of colleagues of userRepositoryExceptionpublic java.util.List<SocialUserProfileDocument.ColleagueData> getColleagues()
public Value getColleagueXml()
<?xml version="1.0" encoding="UTF-8"?>
<gsa:Contacts xmlns:gsa="http://www.google.com/schemas/gsa"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gsa:contact gsa:accountname="accountname" gsa:email="email"
gsa:group="group" gsa:isinworkinggroup="true" gsa:name="name"
gsa:title="mytitle" gsa:url="myurl"/>
</gsa:Contacts>
XSD for the XML is
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.google.com/schemas/gsa"
xmlns:gsa="http://www.google.com/schemas/gsa"
elementFormDefault="qualified">
<element name="Contacts">
<complexType>
<sequence>
<element name="contact" maxOccurs="unbounded" minOccurs="1">
<complexType>
<attribute name="name" type="string" form="qualified"
use="optional" />
<attribute name="email" type="string" form="qualified" />
<attribute name="accountname" type="string" form="qualified"
use="required" />
<attribute name="url" type="string" form="qualified"
use="optional" />
<attribute name="title" type="string" form="qualified"
use="optional" />
<attribute name="group" type="string" form="qualified"
use="optional" />
<attribute name="isinworkinggroup" type="boolean"
form="qualified" use="optional" />
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
public Property findProperty(java.lang.String name)
Property by name. If the current document has a property
then that property is returned.findProperty in interface Documentname - the name of the Property to findProperty, if found; null otherwisepublic java.util.Set<java.lang.String> getPropertyNames()
throws RepositoryException
Properties in this
Document.getPropertyNames in interface DocumentSet of StringsRepositoryException - if a repository access error occursRepositoryDocumentException - if a document has fatal
processing errors