public class AppAPI extends BaseAPI
| Constructor and Description |
|---|
AppAPI(ResourceFactory resourceFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateApp(int appId)
Activates a deactivated app.
|
int |
addApp(ApplicationCreate app)
Creates a new app on a space.
|
int |
addField(int appId,
ApplicationFieldCreate field)
Adds a new field to an app
|
void |
deactivateApp(int appId)
Deactivates the app with the given id.
|
void |
deleteApp(int appId)
Deletes the app with the given id.
|
void |
deleteField(int appId,
int fieldId)
Deletes a field on an app.
|
Application |
getApp(int appId)
Gets the definition of an app and can include configuration and fields.
|
List<Application> |
getApps()
Returns the apps available to the user.
|
List<Application> |
getAppsOnSpace(int spaceId)
Returns all the apps on the space that are visible.
|
Dependencies |
getDependencies(int appId)
Returns the apps that the given app depends on.
|
ApplicationField |
getField(int appId,
int fieldId)
Returns a single field from an app.
|
List<Application> |
getTopApps(Integer limit)
Returns the top apps for the active user.
|
int |
install(int appId,
int spaceId)
Installs the app with the given id on the space.
|
void |
updateApp(int appId,
ApplicationUpdate app)
Updates an app.
|
void |
updateField(int appId,
int fieldId,
ApplicationFieldConfiguration configuration)
Updates the configuration of an app field.
|
void |
updateOrder(int spaceId,
List<Integer> appIds)
Updates the order of the apps on the space.
|
getResourceFactorypublic AppAPI(ResourceFactory resourceFactory)
public Application getApp(int appId)
appId - The id of the app to be returnedpublic List<Application> getAppsOnSpace(int spaceId)
spaceId - The id of the spacepublic List<Application> getTopApps(Integer limit)
limit - The maximum number of apps to return, defaults to 4.public int addApp(ApplicationCreate app)
app - The definition for the new apppublic void updateApp(int appId,
ApplicationUpdate app)
appId - The id of the app to be updatedapp - The updated app definitionpublic int addField(int appId,
ApplicationFieldCreate field)
appId - The id of the the field should be added tofield - The definition of the new fieldpublic void updateField(int appId,
int fieldId,
ApplicationFieldConfiguration configuration)
appId - The id of the app the field is onefieldId - The id of the field to be updatedconfiguration - The new configuration of the fieldpublic ApplicationField getField(int appId, int fieldId)
appId - The id of the app the field is onfieldId - The id of the field to be returnedpublic void deleteField(int appId,
int fieldId)
appId - The id of the app the field is onfieldId - The id of the field that should be deletedpublic int install(int appId,
int spaceId)
appId - The id of the app to be installedspaceId - The id of the space the app should be installed o npublic void updateOrder(int spaceId,
List<Integer> appIds)
spaceId - The id of the space the apps are onappIds - The ids of the apps in the new orderpublic List<Application> getApps()
public Dependencies getDependencies(int appId)
appId - The id of the app the dependecies should be returned forpublic void deactivateApp(int appId)
appId - The id of the app to deactivatepublic void activateApp(int appId)
appId - The id of the app to activatepublic void deleteApp(int appId)
appId - The id of the app to deleteCopyright © 2014. All Rights Reserved.