HubProjectManager
Centralized functions used to manage IHubProject instances
This class is a convenience wrapper over util functions which are also directly accessible for use in scenarios where classes are inconvenient.
Implements
Methods
Method | Returns | Notes |
---|---|---|
|
HubProjectManager |
Factory function to construct a new HubProjectManager instance. Note: Used so that we could do async actions in the ctor. |
|
Promise<IHubProject> |
Create and store new project. Projects are stored as Items in the Sharing API |
|
Promise<void> |
Destroy a project. This permanently removes the backing Item |
|
Promise<IHubProject> |
Fetch a Project via id or it's slug This function does not require a user to be
authenticated, but it does require an |
|
Promise<IHubProject> |
Convert a Hub Project Item to a IHubProject |
|
Promise<IHubSearchResponse<IHubProject>> |
Search for Projects |
|
Promise<ISharingResponse> |
Sets the access level of a Hub Project |
|
Promise<ISharingResponse> |
Shares a Hub Project to a group |
|
Promise<ISharingResponse[]> |
Shares a Hub Project to N Groups. |
|
Promise<ISharingResponse> |
Unshares a Hub Project from a group |
|
Promise<ISharingResponse[]> |
Unshares a Hub Project from N groups. |
|
Promise<IHubProject> |
Update a project |
|
Promise<IHubProject> |
Set the thumbnail for the Project |
init
StaticParameters
Parameter | Type | Default | Notes |
---|---|---|---|
contextOrManager Required | ArcGISContextManager | IArcGISContext |
Returns
Note: Used so that we could do async actions in the ctor.
create
Create and store new project.
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
project Required | Partial<IHubProject> | ||
requestOptions Optional | IUserRequestOptions |
Returns
Projects are stored as Items in the Sharing API
destroy
Destroy a project. This permanently removes the backing Item
Parameters
Returns
fetch
Fetch a Project via id or it's slug
Parameters
Returns
This function does not require a user to be
authenticated, but it does require an IRequestOptions
which contains the portal instance to communicate with
search
Search for Projects
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
query Required | string | IQuery | ||
options Required | IHubSearchOptions |
Returns
setAccess
Sets the access level of a Hub Project
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
project Required | IHubProject | ||
accessLevel Required | "public" | "org" | "private" | ||
requestOptions Optional | IUserRequestOptions |
Returns
update
Update a project
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
project Required | IHubProject | ||
requestOptions Optional | IUserRequestOptions |
Returns
updateThumbnail
Set the thumbnail for the Project
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
project Required | IHubProject | ||
file Required | any | ||
filename Required | string | ||
requestOptions Optional | IUserRequestOptions |
Returns
Class defined in common/src/projects/HubProjectManager.ts:39
Factory function to construct a new HubProjectManager instance.