Package org.jboss.as.logging.resolvers
Class FileResolver
- java.lang.Object
-
- org.jboss.as.logging.resolvers.FileResolver
-
- All Implemented Interfaces:
ModelNodeResolver<String>
public class FileResolver extends Object implements ModelNodeResolver<String>
Used to resolve an absolute path for a file.- Author:
- James R. Perkins
-
-
Field Summary
Fields Modifier and Type Field Description static FileResolverINSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringresolvePath(OperationContext context, String relativeToPath, String path)Resolves the path based on the relative to and the path.StringresolveValue(OperationContext context, org.jboss.dmr.ModelNode value)Formats the attribute to the desired type.
-
-
-
Field Detail
-
INSTANCE
public static final FileResolver INSTANCE
-
-
Method Detail
-
resolveValue
public String resolveValue(OperationContext context, org.jboss.dmr.ModelNode value) throws OperationFailedException
Description copied from interface:ModelNodeResolverFormats the attribute to the desired type.- Specified by:
resolveValuein interfaceModelNodeResolver<String>- Parameters:
context- the operation contextvalue- the value to format- Returns:
- the formatted value
- Throws:
OperationFailedException- if an error occurs
-
resolvePath
public static String resolvePath(OperationContext context, String relativeToPath, String path)
Resolves the path based on the relative to and the path. May returnnullif the service is not up.- Parameters:
context- the operation context.relativeToPath- the relative to path, may benull.path- the path to append to the relative to path or the absolute path if the relative to path isnull.- Returns:
- the full path or
nullif the services were not started.
-
-