Class TargetPlatformServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.targetplatforms.core.service.TargetPlatformServiceImpl
- All Implemented Interfaces:
Adaptable
,Component
,Extensible
,TimestampedService
,TargetPlatformService
TargetPlatformService
implementation relying on runtime extension points.- Since:
- 5.7.1
-
Field Summary
Modifier and TypeFieldDescriptionprotected ServiceConfigurationRegistry
static final DateTimeFormatter
protected TargetPackageRegistry
protected TargetPlatformRegistry
static final String
static final String
static final String
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ComponentContext context) Activates the component.protected TargetPlatformInstanceImpl
Create a TargetPlatformInstance given an id.void
deactivate
(ComponentContext context) Deactivates the component.void
deprecateTargetPlatform
(boolean deprecate, String id) Deprecates the target platform if given boolean is true (or un-deprecates it if boolean is false), overriding the default value from extension points and adding an entry in the override directory.void
enableTargetPlatform
(boolean enable, String id) Enables the target platform if given boolean is true (or disables it boolean is false), overriding the default value from extension points and adding an entry in the override directory.Returns all target platforms matching given criteria.Returns all target platforms info matching given criteria.Returns the default target platform.getDefaultTargetPlatformInstance
(boolean restricted) protected DocumentModel
Returns the override directory name.Returns the target package with given id, or null if not found.protected TargetPackage
Returns the target package info for given id, or null if not found.protected Map<String,
TargetPackage> getTargetPackages
(String targetPlatform) Lookup all packages referencing this target platform.protected Map<String,
TargetPackageInfo> getTargetPackagesInfo
(String targetPlatform) Returns the target platform with given id, or null if not found.protected TargetPlatform
Returns the target platform info for given id, or null if not found.protected TargetPlatformInfo
getTargetPlatformInstance
(String id, List<String> packages) Returns a target platform instance with given id and given enabled packages, or null if not found.void
registerContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) void
Removes overrides for all target platform.void
Removes overrides for this target platform.void
restrictTargetPlatform
(boolean restrict, String id) Restricts the target platform if given boolean is true (or un-restricts it if boolean is false), overriding the default value from extension points and adding an entry in the override directory.void
setDefaultTargetPlatform
(boolean isDefault, String id) Set the target platform as default if given boolean is true (or unset it as default if boolean is false), overriding the default value from extension points and adding an entry in the override directory.void
setTrialTargetPlatform
(boolean trial, String id) Set the target platform as trial if given boolean is true (or unset it as trial if boolean is false), overriding the default value from extension points and adding an entry in the override directory.protected Date
void
unregisterContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) protected void
updateOrCreateEntry
(String id, String prop, Integer value) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
XP_CONF
- See Also:
-
XP_PLATFORMS
- See Also:
-
XP_PACKAGES
- See Also:
-
dateParser
-
conf
-
platforms
-
packages
-
-
Constructor Details
-
TargetPlatformServiceImpl
public TargetPlatformServiceImpl()
-
-
Method Details
-
activate
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
deactivate
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContribution
in classDefaultComponent
-
getDefaultTargetPlatform
Description copied from interface:TargetPlatformService
Returns the default target platform.If several target platforms are found for given filter, the first one is returned (ordered alphabetically on id).
- Specified by:
getDefaultTargetPlatform
in interfaceTargetPlatformService
-
getOverrideDirectory
Description copied from interface:TargetPlatformService
Returns the override directory name.- Specified by:
getOverrideDirectory
in interfaceTargetPlatformService
-
getTargetPlatform
Description copied from interface:TargetPlatformService
Returns the target platform with given id, or null if not found.- Specified by:
getTargetPlatform
in interfaceTargetPlatformService
-
getTargetPlatform
-
getTargetPackages
Lookup all packages referencing this target platform. -
getTargetPackagesInfo
-
toDate
-
getTargetPlatformInfo
Description copied from interface:TargetPlatformService
Returns the target platform info for given id, or null if not found.- Specified by:
getTargetPlatformInfo
in interfaceTargetPlatformService
-
getTargetPlatformInfo
-
getTargetPackage
Description copied from interface:TargetPlatformService
Returns the target package with given id, or null if not found.- Specified by:
getTargetPackage
in interfaceTargetPlatformService
-
getTargetPackageInfo
Description copied from interface:TargetPlatformService
Returns the target package info for given id, or null if not found.- Specified by:
getTargetPackageInfo
in interfaceTargetPlatformService
-
getTargetPackage
-
getTargetPlatformInstance
Description copied from interface:TargetPlatformService
Returns a target platform instance with given id and given enabled packages, or null if not found.Ignore target packages that would not be found.
- Specified by:
getTargetPlatformInstance
in interfaceTargetPlatformService
-
getAvailableTargetPlatforms
Description copied from interface:TargetPlatformService
Returns all target platforms matching given criteria.- Specified by:
getAvailableTargetPlatforms
in interfaceTargetPlatformService
- Parameters:
filter
- the filter to apply, can be null if no filtering is needed.- See Also:
-
getAvailableTargetPlatformsInfo
Description copied from interface:TargetPlatformService
Returns all target platforms info matching given criteria.- Specified by:
getAvailableTargetPlatformsInfo
in interfaceTargetPlatformService
- Parameters:
filter
- the filter to apply, can be null if no filtering is needed.- See Also:
-
deprecateTargetPlatform
Description copied from interface:TargetPlatformService
Deprecates the target platform if given boolean is true (or un-deprecates it if boolean is false), overriding the default value from extension points and adding an entry in the override directory.- Specified by:
deprecateTargetPlatform
in interfaceTargetPlatformService
-
enableTargetPlatform
Description copied from interface:TargetPlatformService
Enables the target platform if given boolean is true (or disables it boolean is false), overriding the default value from extension points and adding an entry in the override directory.- Specified by:
enableTargetPlatform
in interfaceTargetPlatformService
-
restrictTargetPlatform
Description copied from interface:TargetPlatformService
Restricts the target platform if given boolean is true (or un-restricts it if boolean is false), overriding the default value from extension points and adding an entry in the override directory.- Specified by:
restrictTargetPlatform
in interfaceTargetPlatformService
-
setTrialTargetPlatform
Description copied from interface:TargetPlatformService
Set the target platform as trial if given boolean is true (or unset it as trial if boolean is false), overriding the default value from extension points and adding an entry in the override directory.- Specified by:
setTrialTargetPlatform
in interfaceTargetPlatformService
-
setDefaultTargetPlatform
Description copied from interface:TargetPlatformService
Set the target platform as default if given boolean is true (or unset it as default if boolean is false), overriding the default value from extension points and adding an entry in the override directory.- Specified by:
setDefaultTargetPlatform
in interfaceTargetPlatformService
-
restoreTargetPlatform
Description copied from interface:TargetPlatformService
Removes overrides for this target platform.- Specified by:
restoreTargetPlatform
in interfaceTargetPlatformService
-
restoreAllTargetPlatforms
public void restoreAllTargetPlatforms()Description copied from interface:TargetPlatformService
Removes overrides for all target platform.- Specified by:
restoreAllTargetPlatforms
in interfaceTargetPlatformService
-
updateOrCreateEntry
-
getDirectoryEntry
-
getDefaultTargetPlatformInstance
- Specified by:
getDefaultTargetPlatformInstance
in interfaceTargetPlatformService
- Returns:
- the default target platform instance and enabled if not found.
-
createTargetPlatformInstanceFromId
Create a TargetPlatformInstance given an id.- Since:
- 5.9.3-NXP-15602
-