Class BasicPlatformPackageResult<T>
java.lang.Object
net.solarnetwork.node.service.support.BasicPlatformPackageResult<T>
- Type Parameters:
T- the context type
- All Implemented Interfaces:
PlatformPackageService.PlatformPackageResult<T>
public class BasicPlatformPackageResult<T>
extends Object
implements PlatformPackageService.PlatformPackageResult<T>
A basic, immutable implementation of
PlatformPackageService.PlatformPackageResult.- Since:
- 1.68
- Version:
- 1.0
- Author:
- matt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the context object.Get a result exception.Get a complete list of files installed from the package.Get a result message.booleanGet the success flag.
-
Constructor Details
-
BasicPlatformPackageResult
public BasicPlatformPackageResult(boolean success, String message, Throwable exception, List<Path> extractedPaths, T context) Constructor.- Parameters:
success- the success flagmessage- the messageexception- the exceptionextractedPaths- the extracted pathscontext- the context
-
-
Method Details
-
isSuccess
public boolean isSuccess()Description copied from interface:PlatformPackageService.PlatformPackageResultGet the success flag.- Specified by:
isSuccessin interfacePlatformPackageService.PlatformPackageResult<T>- Returns:
- true if the package was extracted successfully
-
getMessage
Description copied from interface:PlatformPackageService.PlatformPackageResultGet a result message.- Specified by:
getMessagein interfacePlatformPackageService.PlatformPackageResult<T>- Returns:
- a result message (or null)
-
getException
Description copied from interface:PlatformPackageService.PlatformPackageResultGet a result exception.- Specified by:
getExceptionin interfacePlatformPackageService.PlatformPackageResult<T>- Returns:
- an exception, or null if no exception occurred
-
getExtractedPaths
Description copied from interface:PlatformPackageService.PlatformPackageResultGet a complete list of files installed from the package.- Specified by:
getExtractedPathsin interfacePlatformPackageService.PlatformPackageResult<T>- Returns:
- the extracted paths, or null if nothing installed
-
getContext
Description copied from interface:PlatformPackageService.PlatformPackageResultGet the context object.- Specified by:
getContextin interfacePlatformPackageService.PlatformPackageResult<T>- Returns:
- the context object
-