HubProject
Hub Project Class
Implements
- IWithStoreBehavior
- IWithSharingBehavior
- IWithThumbnailBehavior
- IWithFeaturedImageBehavior
- IWithPermissionBehavior
- IWithCapabilityBehavior
- IWithStoreBehavior
- IWithCatalogBehavior
- IWithSharingBehavior
Extends
Constructors
Constructor Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
entity Required | IHubProject | ||
context Required | IArcGISContext |
Properties
Property | Type | Notes |
---|---|---|
Protected Inherited | IArcGISContext | |
Protected Inherited | IHubProject | |
Protected Inherited | false | |
Protected Inherited | null |
Accessors
Accessor | Type | Notes |
---|---|---|
Catalog |
Catalog instance for this project. Note: Do not hold direct references to this object; always access it from the project. |
|
Inherited | boolean |
Can the current user delete the Entity? In order to delete an item, the user must be the owner of the item or a full org_admin in the owner's organization. |
Inherited | boolean |
Can the current user edit the Entity? In order to edit an item, the user must be the owner of the item or be a member of a shared editing group, to which the item is shared. |
Inherited | string |
Return the entity id |
Inherited | string |
The orgId of the Entity, if available |
Inherited | string |
Return the entity owner |
Methods
Method | Returns | Notes |
---|---|---|
|
Promise<HubProject> |
Create a new HubProject, returning a HubProject instance. Note: This does not persist the Project into the backing store |
|
Promise<HubProject> |
Fetch a Project from the backing store and return a HubProject instance. |
|
HubProject |
Create an instance from an IHubProject object |
|
Promise<IEditorConfig> |
Static method to get the editor config for the HubProject entity. |
|
Promise<void> |
Delete the HubProject from the store set a flag to indicate that it is destroyed |
|
Promise<void> |
Save the HubProject to the backing store. Currently Projects are stored as Items in Portal |
|
void |
Apply a new state to the instance |
|
void |
Add a policy to the entity |
|
Promise<void> |
Hook that subclasses should call to invoke shared post-save behavior |
|
ICapabilityAccessResponse |
Check if the current user can access a specific capability |
|
IPermissionAccessResponse |
Check if current user has a specific permission, accounting for both system and entity level policies |
|
Promise<void> |
Remove the featured image from the item |
|
IEntityPermissionPolicy[] |
Get all policies related to a specific permission |
|
string |
Return the full url to the thumbnail, optionally with a width parameter |
|
void |
Remove a policy from the entity |
|
Promise<void> |
Set the access level of the backing item |
|
Promise<void> |
Set a featured image on the Entity, if one already exists it is cleared out before the new one is set to keep the number of resources in control |
|
void |
Store thumbnail information to be sent with the next |
|
Promise<void> |
Share the Entity with the specified group id |
|
Promise<IGroup[]> |
Return a list of groups the Entity is shared to. |
|
IHubProject |
Return the backing entity as an object literal |
|
Promise<void> |
Unshare the Entity with the specified group id |
create
StaticParameters
Parameter | Type | Default | Notes |
---|---|---|---|
partialProject Required | Partial<IHubProject> | ||
context Required | IArcGISContext | ||
save Optional | boolean | false |
Returns
fetch
StaticFetch a Project from the backing store and return a HubProject instance.
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
identifier Required | string |
Identifier of the project to load |
|
context Required | IArcGISContext |
Returns
fromJson
StaticCreate an instance from an IHubProject object
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
json Required | Partial<IHubProject> |
JSON object to create a HubProject from |
|
context Required | IArcGISContext |
ArcGIS context |
Returns
getEditorConfig
StaticStatic method to get the editor config for the HubProject entity.
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
i18nScope Required | string |
translation scope to be interpolated into the uiSchema |
|
type Required | ProjectEditorType |
editor type - corresonds to the returned uiSchema |
|
options Optional | UiSchemaElementOptions[] | [] |
optional hash of dynamic uiSchema element options Note: typescript does not have a means to specify static methods in interfaces so while this is the implementation of IWithEditorBehavior, it is not enforced by the compiler. |
Returns
delete
Delete the HubProject from the store set a flag to indicate that it is destroyed
Returns
save
Save the HubProject to the backing store. Currently Projects are stored as Items in Portal
Returns
update
Apply a new state to the instance
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
changes Required | Partial<IHubProject> |
Returns
addPermissionPolicy
Add a policy to the entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
policy Required | IEntityPermissionPolicy |
Returns
afterSave
Hook that subclasses should call to invoke shared post-save behavior
Returns
checkCapability
Check if the current user can access a specific capability
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
capability Required | Capability |
Returns
checkPermission
Check if current user has a specific permission, accounting for both system and entity level policies
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission |
Returns
getPermissionPolicies
Get all policies related to a specific permission
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission |
Returns
getThumbnailUrl
Return the full url to the thumbnail, optionally with a width parameter
Parameters
Returns
removePermissionPolicy
Remove a policy from the entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission | ||
id Required | string |
Returns
setAccess
Set the access level of the backing item
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
access Required | SettableAccessLevel |
Returns
setFeaturedImage
Set a featured image on the Entity, if one already exists it is cleared out before the new one is set to keep the number of resources in control
Parameters
Returns
setThumbnail
Store thumbnail information to be sent with the next .save()
call
Parameters
Returns
Class defined in common/src/projects/HubProject.ts:23
Create a new HubProject, returning a HubProject instance. Note: This does not persist the Project into the backing store