📄 ipersonalizationdata.java
字号:
package com.esri.solutions.jitk.personalization.data;
import java.util.List;
import java.util.UUID;
import com.esri.solutions.jitk.personalization.PersonalizationException;
import com.esri.solutions.jitk.personalization.data.beans.v1.QueryType;
/**
* Provides access to the Personalized Data for a user. From this interface, the user can
* retrieve specific personalization data by ID, retrieve lists of personalization data, and can
* create specific personalization data objects.
*/
public interface IPersonalizationData {
/**
* Default Page Size.
*/
public static final int DEFAULT_PAGE_SIZE = 10;
/**
* Retrieves the Map Composition with the specified ID. If a Map Composition with the
* specified ID does not exist, then <code>null</code> will be returned.
*
* @param id Unique identifier of the Map Composition
* @return Instance of {@link IMapComposition} if one is found for the ID, or <code>null</code>
* if a Map Composition cannot be found.
* @throws PersonalizationException Thrown if there was a problem retrieving the
* Map Composition.
*/
public IMapComposition getMapComposition(UUID id) throws PersonalizationException;
/**
* Retrieves a full list of all Map Compositions for the User. This operation could be dangerous
* if there are numerous Map Compositions stored. If no Map Compositions are found, then
* an empty list will be returned.
*
* @return List of Map Compositions. <code>null</code> will never be returned.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the Map
* Compositions.
*/
public List<IMapComposition> getMapCompositions() throws PersonalizationException;
/**
* Retrieves a page of Map Compositions. This method can be used to retrieve a list of
* Map Compositions in manageable chunks. The caller can determine the page size. The page size
* is specified as the number of records.
*
* @param page Page number to retrieve.
* @param pageSize Number of Map Compositions per page.
*
* @return List of Map Compositions. If the page number is out of range, then an empty list is returned.
* The size of the list will be less than or equal to the <code>pageSize</code> argument.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the Map Compositions.
*/
public List<IMapComposition> getMapCompositions(int page, int pageSize) throws PersonalizationException;
/**
* Retrieves a total count of Map Compositions for the User.
*
* @return Count of Map Compositions for the User.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the count.
*/
public long getMapCompositionCount() throws PersonalizationException;
/**
* Retrieves the Bookmark with the specified ID. If a Bookmark with the
* specified ID does not exist, then <code>null</code> will be returned.
*
* @param id Unique identifier of the Bookmark
* @return Instance of {@link IBookmark} if one is found for the ID, or <code>null</code>
* if a Bookmark cannot be found.
* @throws PersonalizationException Thrown if there was a problem retrieving the
* Bookmark.
*/
public IBookmark getBookmark (UUID id) throws PersonalizationException;
/**
* Retrieves a full list of all Bookmarks for the User. This operation could be dangerous
* if there are numerous Bookmarks stored. If no Bookmarks are found, then
* an empty list will be returned.
*
* @return List of Bookmarks. <code>null</code> will never be returned.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the Bookmarks.
*/
public List<IBookmark> getBookmarks() throws PersonalizationException;
/**
* Retrieves a page of Bookmarks. This method can be used to retrieve a list of
* Bookmarks in manageable chunks. The caller can determine the page size. The page size
* is specified as the number of records.
*
* @param page Page number to retrieve, must be zero or positive.
* @param pageSize Number of Bookmarks per page.
*
* @return List of Bookmarks. If the page number is out of range, then an empty list is returned.
* The size of the list will be less than or equal to the <code>pageSize</code> argument.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the Bookmarks.
*/
public List<IBookmark> getBookmarks(int page, int pageSize) throws PersonalizationException;
/**
* Retrieves a total count of Bookmarks for the User.
*
* @return Count of Bookmarks for the User.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the count.
*/
public long getBookmarkCount () throws PersonalizationException;
/**
* Retrieves the Query with the specified ID. If a Query with the
* specified ID does not exist, then <code>null</code> will be returned.
*
* @param id Unique identifier of the Query
* @return Instance of {@link IQuery} if one is found for the ID, or <code>null</code>
* if a Query cannot be found.
* @throws PersonalizationException Thrown if there was a problem retrieving the
* Query.
*/
public IQuery getQuery (UUID id) throws PersonalizationException;
/**
* Retrieves a full list of all Queries for the User. This operation could be dangerous
* if there are numerous Queries stored. If no Queries are found, then
* an empty list will be returned.
*
* @return List of Queries. <code>null</code> will never be returned.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the Queries.
*/
public List<IQuery> getQueries () throws PersonalizationException;
/**
* Retrieves a page of Queries. This method can be used to retrieve a list of
* Queries in manageable chunks. The caller can determine the page size. The page size
* is specified as the number of records.
*
* @param page Page number to retrieve. Must be zero or positive.
* @param pageSize Number of Queries per page.
*
* @return List of Queries. If the page number is out of range, then an empty list is returned.
* The size of the list will be less than or equal to the <code>pageSize</code> argument.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the Queries.
*/
public List<IQuery> getQueries (int page, int pageSize) throws PersonalizationException;
/**
* Retrieves a total count of Queries for the User.
*
* @return Count of Queries for the User.
*
* @throws PersonalizationException Thrown if there was a problem retrieving the count.
*/
public long getQueryCount () throws PersonalizationException;
public IPreferenceSettings getPreferenceSettings () throws PersonalizationException;
/**
* Returns the User who owns this Personalization Data.
*
* @return User who owns this Personalization Data.
*/
public IUser getCurrentUser ();
/**
* Creates a new Map Composition. The IsNew property should be <code>true</code> on the
* returned Map Composition.
*
* @return New Map Composition, <code>null</code> should not be returned.
*
* @throws PersonalizationException Thrown if there was a problem creating the Map Composition.
*/
public IMapComposition createMapComposition () throws PersonalizationException;
/**
* Creates a new Bookmark. The IsNew property should be <code>true</code> on the
* returned Bookmark.
*
* @return New Bookmark, <code>null</code> should not be returned.
*
* @throws PersonalizationException Thrown if there was a problem creating the Bookmark.
*/
public IBookmark createBookmark() throws PersonalizationException;
/**
* Creates a new Query. The IsNew property should be <code>true</code> on the
* returned Query.
*
* @return New Query, <code>null</code> should not be returned.
*
* @throws PersonalizationException Thrown if there was a problem creating the Query.
*/
public IQuery createQuery(IQuery.Type type) throws PersonalizationException;
/**
* Creates a new Query from the given <code>query</code>. The IsNew property should be
* <code>true</code> on the returned Query.
*
* @param query The {@link QueryType} used to create the Query.
* @return New Query, <code>null</code> should not be returned.
*
* @throws PersonalizationException Thrown if there was a problem creating the Query.
*/
public IQuery createQuery(QueryType query) throws PersonalizationException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -