A repository holding the source of one app, theme, library or recipe installed into an organisation. This is the Repository subtype with discriminator AP, so it inherits branches, commits and the live branch from Repository, and the live branch name is the app's installed version. Installing an app from the marketplace creates one of these in the target organisation and branches it at the published version, which is why the same app installed into two organisations is two separate repositories. The themeProvider, appProvider and recipeProvider flags say what the repository supplies, and a repository providing none of the three is treated as a library. Deleting is normally soft, which renames both the repository and the app name so the name can be reused.
Group: Database Entities
Extends: Repository
Implements: VfsAcceptor
Properties
| Property | Returns | Description |
|---|---|---|
| appName | String | The app's identifier, which is what the marketplace and the app manager look the app up by. Mandatory and up to 255 characters. It is usually the same as the repository name, but the two are separate columns and a soft delete renames both, so do not assume they stay in step. |
| appProvider | Boolean | Whether this repository supplies an app. Null means it has never been set rather than false, so test it null safely. |
| appRepoType | AppRepoType | How the repository is hosted. Currently only PRIVATE_REPO is used, which is what both create and installApp set. |
| marketPlaceItem | MarketPlaceItem | The marketplace listing this repository publishes, or null if it has never been listed. Despite the get prefix this queries the database on every call using the current session, so hold the result rather than calling it in a loop. |
| recipeProvider | Boolean | Whether this repository supplies a recipe. Null means it has never been set rather than false, so test it null safely. A repository that provides none of theme, app or recipe is treated as a library. |
| repoType | String | The repository discriminator for an app repository, always the literal AP. Use this to tell an app repository apart from the other Repository subtypes. |
| themeProvider | Boolean | Whether this repository supplies a theme. Null means it has never been set rather than false, so test it null safely. |
Inherited from Repository
Properties
| Property | Returns | Description |
|---|---|---|
| baseEntity | BaseEntity | The entity that contains this repository. The entity might be a user, organisation, etc The repository name must be unique within its parent entity |
| branches | List<Branch> | |
| category | RepositoryCategory | |
| createdDate | Date | |
| deleted | Boolean | To support soft deletes |
| id | long | |
| liveBranch | String | |
| name | String | |
| notes | String | |
| publicContent | boolean | |
| publishedBy | Profile | |
| publishedDate | Date | |
| title | String | |
| trunk | Branch | |
| type | String |
Methods
getRepoType() · getAppName() · setAppName(String name) · setOrganisation(Organisation organisation) · isThemeProvider() · setThemeProvider(Boolean themeProvider) · isAppProvider() · setAppProvider(Boolean appProvider) · isRecipeProvider() · setRecipeProvider(Boolean recipeProvider) · getAppRepoType() · setAppRepoType(AppRepoType appRepoType) · getMarketPlaceItem()
getRepoType()
Returns: String
The repository discriminator for an app repository, always the literal AP. Use this to tell an app repository apart from the other Repository subtypes.
getAppName()
Returns: String
The app's identifier, which is what the marketplace and the app manager look the app up by. Mandatory and up to 255 characters. It is usually the same as the repository name, but the two are separate columns and a soft delete renames both, so do not assume they stay in step.
setAppName(String name)
Returns: void
Sets the app's identifier. Changing it changes which app the platform believes this repository provides, so it is not a display label.
| Parameter | Description |
|---|---|
name | the app name, up to 255 characters |
setOrganisation(Organisation organisation)
Returns: void
Sets the organisation this app is installed into. Required, and normally set together with the underlying repository's base entity.
| Parameter | Description |
|---|---|
organisation | the owning organisation |
isThemeProvider()
Returns: Boolean
Whether this repository supplies a theme. Null means it has never been set rather than false, so test it null safely.
setThemeProvider(Boolean themeProvider)
Returns: void
Marks whether this repository supplies a theme.
| Parameter | Description |
|---|---|
themeProvider | true if it provides a theme, or null to leave it unset |
isAppProvider()
Returns: Boolean
Whether this repository supplies an app. Null means it has never been set rather than false, so test it null safely.
setAppProvider(Boolean appProvider)
Returns: void
Marks whether this repository supplies an app.
| Parameter | Description |
|---|---|
appProvider | true if it provides an app, or null to leave it unset |
isRecipeProvider()
Returns: Boolean
Whether this repository supplies a recipe. Null means it has never been set rather than false, so test it null safely. A repository that provides none of theme, app or recipe is treated as a library.
setRecipeProvider(Boolean recipeProvider)
Returns: void
Marks whether this repository supplies a recipe.
| Parameter | Description |
|---|---|
recipeProvider | true if it provides a recipe, or null to leave it unset |
getAppRepoType()
Returns: AppRepoType
How the repository is hosted. Currently only PRIVATE_REPO is used, which is what both create and installApp set.
setAppRepoType(AppRepoType appRepoType)
Returns: void
Sets how the repository is hosted.
| Parameter | Description |
|---|---|
appRepoType | the repository type |
getMarketPlaceItem()
Returns: MarketPlaceItem
The marketplace listing this repository publishes, or null if it has never been listed. Despite the get prefix this queries the database on every call using the current session, so hold the result rather than calling it in a loop.