Disabling Asset Types
The following are the two scenarios in which asset types are disabled:
Disabling asset types in the default ES implementation
Follow the instructions below to disable one or more asset types in the default ES implementation:
For more information on app extensions, see Introduction to App Extensions.
- Create the shell of an app extension. For more information, see Creating the Shell of an App Extension.
Disable the asset types in the
app.server
callback method, using thedisabledAssets
property, in the Publisher or Storeapp.js
file, based on your customization requirements.disabledAssets:['<ASSET_TYPE>','<ASSET_TYPE>']
The
app.js
files of the default Publisher and Store app extensions are as follows:ES Component File Path Publisher <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/app/publisher-common/app.js
Store <ES_HOME>/repository/deployment/server/jaggeryapps/store/extensions/app/store-common/app.js
Example:
You can disable multiple asset types as follows:
disabledAssets: ['ebook','api','wsdl']
You can disable a single asset type named
gadget
as follows:disabledAssets:['gadget']
When disabling an asset type together with other customizations it can appear as follows:
app.server = function(ctx) { return { endpoints: { pages: [{ title: 'Publisher | Servicex Page', url: 'servicex_global', path: 'servicex_global.jag' }, { title: 'Publisher | Servicex Splash page', url: 'splash', path: 'servicex_splash.jag' }] }, configs:{ landingPage:'/assets/servicex/list', disabledAssets:['gadget'] } } };
- Restart ES, so that ES evaluates the changes in the
app.js
file. - Access the respective ES console to verify whether the disabled asset type no longer appears in the list of available asset types.
Disabling asset types via an app extension
This scenario is applicable if you have customized the default ES implementation using an app extension.
Follow the instructions below to disable one or more asset types via an app extension:
For more information on app extensions, see Introduction to App Extensions.
- Create the shell of an app extension. For more information, see Creating the Shell of an App Extension.
Add a dependency to the default app extension, using the
app.dependencies
property in the Store or Publisherapp.js
file, based on your customization requirements. Theapp.js
files of the Publisher and Store app extension are as follows:ES Component File Path Publisher <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/app/<APP_EXTENSION_NAME>/app.js
Store <ES_HOME>/repository/deployment/server/jaggeryapps/store/extensions/app/<APP_EXTENSION_NAME>/app.js
Example:You can add a dependency to the default app extension in the Publisher as follows:
app.dependencies = ['publisher_common'];
You can add a dependency to the default app extension in the Store as follows:
app.dependencies = ['store_common'];
Disable the asset types in the
app.server
callback method, using thedisabledAssets
property, in the Store or Publisherapp.js
file, based on your customization requirements.disabledAssets:['<ASSET_TYPE>','<ASSET_TYPE>']
Example:
You can disable multiple asset types as follows:
disabledAssets: ['ebook','api','wsdl']
You can disable a single asset type named
gadget
as follows:disabledAssets:['gadget']
When disabling an asset type together with other customizations it can appear as follows:
app.dependencies = ['store_common']; app.server = function(ctx) { return { endpoints: { pages: [{ title: 'Publisher | Servicex Page', url: 'servicex_global', path: 'servicex_global.jag' }, { title: 'Publisher | Servicex Splash page', url: 'splash', path: 'servicex_splash.jag' }] }, configs:{ landingPage:'/assets/servicex/list', disabledAssets:['gadget'] } } };
- Restart the ES server, so that ES evaluates the changes in the
app.js
file. - Access Publisher or Store based on your customization to verify whether the disabled asset type no longer appears in the list of available asset types.