@Override
 public void execute(OperationContext context, ModelNode operation)
     throws OperationFailedException {
   if (context.getProcessType() == ProcessType.SELF_CONTAINED) {
     throw DomainControllerLogger.ROOT_LOGGER.cannotReadContentFromSelfContainedServer();
   }
   final Resource deploymentResource = context.readResource(PathAddress.EMPTY_ADDRESS);
   ModelNode contentItemNode = getContentItem(deploymentResource);
   // Validate this op is available
   if (!isManaged(contentItemNode)) {
     throw DomainControllerLogger.ROOT_LOGGER.cannotReadContentFromUnmanagedDeployment();
   }
   final byte[] deploymentHash =
       CONTENT_HASH.resolveModelAttribute(context, contentItemNode).asBytes();
   final ModelNode pathNode = DEPLOYMENT_CONTENT_PATH.resolveModelAttribute(context, operation);
   final String path;
   if (pathNode.isDefined()) {
     path = pathNode.asString();
   } else {
     path = "";
   }
   int depth = DEPTH.resolveModelAttribute(context, operation).asInt();
   boolean explodable = ARCHIVE.resolveModelAttribute(context, operation).asBoolean();
   try {
     for (ContentRepositoryElement content :
         contentRepository.listContent(
             deploymentHash, path, ContentFilter.Factory.createContentFilter(depth, explodable))) {
       ModelNode contentNode = new ModelNode();
       contentNode.get(PATH).set(content.getPath());
       contentNode.get(DIRECTORY).set(content.isFolder());
       if (!content.isFolder()) {
         contentNode.get(FILE_SIZE).set(content.getSize());
       }
       context.getResult().add(contentNode);
     }
   } catch (ExplodedContentException ex) {
     throw new OperationFailedException(ex.getMessage());
   }
 }