|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.facetmap.example.movies.PreferenceResourceIdQuery
public class PreferenceResourceIdQuery
wraps the PreferenceEngine in a query object so that the Facetmap engine can use it. When Facetmap is processing a request, it will send a heading ID to this class (our movie-browsing user interface is responsible for creating the heading ID; in this case it's created from the user ID). This class must fetch the IDs of all records that correspond to the provided heading -- in this case, all movies recommended for the user.
Other methods here control the display of general facet information; namely, the titles of the facet and its root heading.
| Constructor Summary | |
|---|---|
PreferenceResourceIdQuery(PreferenceEngine engine)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getDisplayTitle(java.lang.String headingId)
Return a title that describes the query corresponding to a Heading ID. |
int[] |
getResourceIds(java.lang.String headingId)
A real-life preference engine might set the headingID to be the username or user ID of whoever is browsing the site. |
java.lang.String |
getRootDisplayTitle()
Return the title that describes the set of all resources. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PreferenceResourceIdQuery(PreferenceEngine engine)
| Method Detail |
|---|
public java.lang.String getDisplayTitle(java.lang.String headingId)
ResourceIdQuery
getDisplayTitle in interface ResourceIdQuerypublic java.lang.String getRootDisplayTitle()
ResourceIdQuery
getRootDisplayTitle in interface ResourceIdQuerypublic int[] getResourceIds(java.lang.String headingId)
Alternatively the user could be stored in the HTTP session anyway, or in other persistent state. But we don't need to give this object access to the session if we convey the information in an argument.
getResourceIds in interface ResourceIdQuery
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||