Package org.jboss.as.server.deployment
Class DeploymentHandlerUtils
- java.lang.Object
-
- org.jboss.as.server.deployment.DeploymentHandlerUtils
-
public abstract class DeploymentHandlerUtils extends Object
- Author:
- Carlo de Wolf
-
-
Constructor Summary
Constructors Constructor Description DeploymentHandlerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddFlushHandler(OperationContext context, ContentRepository contentRepository, OperationContext.ResultHandler handler)Adds a new result handler that will flush (aka amend commit) the changes in the content repository.protected static StringasString(org.jboss.dmr.ModelNode node, String name)protected static OperationFailedExceptioncreateFailureException(String msg)protected static OperationFailedExceptioncreateFailureException(Throwable cause, String msg)static InputStreamemptyStream()protected static org.jboss.as.server.deployment.DeploymentHandlerUtil.ContentItem[]getContents(org.jboss.dmr.ModelNode contentNode)static InputStreamgetInputStream(OperationContext context, org.jboss.dmr.ModelNode contentItem)static booleanhasValidContentAdditionParameterDefined(org.jboss.dmr.ModelNode operation)Checks to see if a valid deployment parameter has been defined.protected static voidvalidateOnePieceOfContent(org.jboss.dmr.ModelNode content)
-
-
-
Method Detail
-
createFailureException
protected static OperationFailedException createFailureException(String msg)
-
createFailureException
protected static OperationFailedException createFailureException(Throwable cause, String msg)
-
getContents
protected static org.jboss.as.server.deployment.DeploymentHandlerUtil.ContentItem[] getContents(org.jboss.dmr.ModelNode contentNode)
-
getInputStream
public static InputStream getInputStream(OperationContext context, org.jboss.dmr.ModelNode contentItem) throws OperationFailedException
- Throws:
OperationFailedException
-
hasValidContentAdditionParameterDefined
public static boolean hasValidContentAdditionParameterDefined(org.jboss.dmr.ModelNode operation)
Checks to see if a valid deployment parameter has been defined.- Parameters:
operation- the operation to check.- Returns:
trueof the parameter is valid, otherwisefalse.
-
validateOnePieceOfContent
protected static void validateOnePieceOfContent(org.jboss.dmr.ModelNode content) throws OperationFailedException- Throws:
OperationFailedException
-
emptyStream
public static InputStream emptyStream()
-
addFlushHandler
public static void addFlushHandler(OperationContext context, ContentRepository contentRepository, OperationContext.ResultHandler handler)
Adds a new result handler that will flush (aka amend commit) the changes in the content repository.- Parameters:
context-contentRepository-handler-
-
-