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
FieldsModifier and TypeFieldDescriptionstatic final DateTimeFormatterprotected Map<String, TargetPackageDescriptor> protected Map<String, TargetPlatformDescriptor> static final Stringstatic final Stringstatic final StringFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TargetPlatformInstanceImplCreate a TargetPlatformInstance given an id.voiddeprecateTargetPlatform(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.voidenableTargetPlatform(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.protected <I extends TargetInfo>
List<I> getAvailableInfo(Function<TargetPlatformDescriptor, I> mapper, TargetPlatformFilter filter) Returns all target platforms matching given criteria.Returns all target platforms info matching given criteria.Returns the default target platform.getDefaultTargetPlatformInstance(boolean restricted) protected DocumentModelprotected <I extends TargetInfo>
Map<String, I> Returns the override directory name.Returns the target package with given id, or null if not found.protected TargetPackageReturns 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 TargetPlatformReturns the target platform info for given id, or null if not found.protected TargetPlatformInfogetTargetPlatformInstance(String id, List<String> packages) Returns a target platform instance with given id and given enabled packages, or null if not found.voidRemoves overrides for all target platform.voidRemoves overrides for this target platform.voidrestrictTargetPlatform(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.voidsetDefaultTargetPlatform(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.voidsetTrialTargetPlatform(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.voidstart(ComponentContext context) Start the component.voidstop(ComponentContext context) Stop the component.protected Dateprotected voidupdateOrCreateEntry(String id, String prop, Integer value) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterContribution, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
XP_CONF
- See Also:
-
XP_PLATFORMS
- See Also:
-
XP_PACKAGES
- See Also:
-
dateParser
-
targetPlatforms
-
targetPackages
-
-
Constructor Details
-
TargetPlatformServiceImpl
public TargetPlatformServiceImpl()
-
-
Method Details
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
stop
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent
-
getDefaultTargetPlatform
Description copied from interface:TargetPlatformServiceReturns the default target platform.If several target platforms are found for given filter, the first one is returned (ordered alphabetically on id).
- Specified by:
getDefaultTargetPlatformin interfaceTargetPlatformService
-
getOverrideDirectory
Description copied from interface:TargetPlatformServiceReturns the override directory name.- Specified by:
getOverrideDirectoryin interfaceTargetPlatformService
-
getTargetPlatform
Description copied from interface:TargetPlatformServiceReturns the target platform with given id, or null if not found.- Specified by:
getTargetPlatformin interfaceTargetPlatformService
-
getTargetPlatform
-
getTargetPackages
Lookup all packages referencing this target platform. -
getTargetPackagesInfo
-
getInfo
-
toDate
-
getTargetPlatformInfo
Description copied from interface:TargetPlatformServiceReturns the target platform info for given id, or null if not found.- Specified by:
getTargetPlatformInfoin interfaceTargetPlatformService
-
getTargetPlatformInfo
-
getTargetPackage
Description copied from interface:TargetPlatformServiceReturns the target package with given id, or null if not found.- Specified by:
getTargetPackagein interfaceTargetPlatformService
-
getTargetPackageInfo
Description copied from interface:TargetPlatformServiceReturns the target package info for given id, or null if not found.- Specified by:
getTargetPackageInfoin interfaceTargetPlatformService
-
getTargetPackage
-
getTargetPlatformInstance
Description copied from interface:TargetPlatformServiceReturns 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:
getTargetPlatformInstancein interfaceTargetPlatformService
-
getAvailableTargetPlatforms
Description copied from interface:TargetPlatformServiceReturns all target platforms matching given criteria.- Specified by:
getAvailableTargetPlatformsin interfaceTargetPlatformService- Parameters:
filter- the filter to apply, can be null if no filtering is needed.- See Also:
-
getAvailableTargetPlatformsInfo
Description copied from interface:TargetPlatformServiceReturns all target platforms info matching given criteria.- Specified by:
getAvailableTargetPlatformsInfoin interfaceTargetPlatformService- Parameters:
filter- the filter to apply, can be null if no filtering is needed.- See Also:
-
getAvailableInfo
protected <I extends TargetInfo> List<I> getAvailableInfo(Function<TargetPlatformDescriptor, I> mapper, TargetPlatformFilter filter) -
deprecateTargetPlatform
Description copied from interface:TargetPlatformServiceDeprecates 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:
deprecateTargetPlatformin interfaceTargetPlatformService
-
enableTargetPlatform
Description copied from interface:TargetPlatformServiceEnables 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:
enableTargetPlatformin interfaceTargetPlatformService
-
restrictTargetPlatform
Description copied from interface:TargetPlatformServiceRestricts 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:
restrictTargetPlatformin interfaceTargetPlatformService
-
setTrialTargetPlatform
Description copied from interface:TargetPlatformServiceSet 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:
setTrialTargetPlatformin interfaceTargetPlatformService
-
setDefaultTargetPlatform
Description copied from interface:TargetPlatformServiceSet 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:
setDefaultTargetPlatformin interfaceTargetPlatformService
-
restoreTargetPlatform
Description copied from interface:TargetPlatformServiceRemoves overrides for this target platform.- Specified by:
restoreTargetPlatformin interfaceTargetPlatformService
-
restoreAllTargetPlatforms
public void restoreAllTargetPlatforms()Description copied from interface:TargetPlatformServiceRemoves overrides for all target platform.- Specified by:
restoreAllTargetPlatformsin interfaceTargetPlatformService
-
updateOrCreateEntry
-
getDirectoryEntry
-
getDefaultTargetPlatformInstance
- Specified by:
getDefaultTargetPlatformInstancein 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
-