test_class.declarator: rrdOps
test_class.modifier: private
test_class.original_string: private CreateRrdOperations rrdOps;
test_class.type: CreateRrdOperations
test_class.var_name: rrdOps
test_class.declarator: statementContext
test_class.modifier: private
test_class.original_string: private StatementContext statementContext;
test_class.type: StatementContext
test_class.var_name: statementContext
test_class.file: meta/src/test/java/org/jboss/hal/meta/processing/CreateRrdOperationsTest.java
test_class.identifier: CreateRrdOperationsTest
test_case.body: @Test
      public void recursive() {
          LookupResult lookupResult = new LookupResult(Sets.<AddressTemplate>newHashSet(AddressTemplate.of("foo=bar")));
          List<Operation> operations = rrdOps.create(new LookupContext(lookupResult), true, false);
          Operation operation = operations.get(0);
          assertEquals(RRD_DEPTH, operation.get(RECURSIVE_DEPTH).asInt());
      }
test_case.class_method_signature: CreateRrdOperationsTest.recursive()
test_case.full_signature: @Test public void recursive()
test_case.identifier: recursive
test_case.invocations: newHashSet of create get assertEquals asInt get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void recursive()
focal_class.declarator: securityContextStatementContext
focal_class.modifier: private final
focal_class.original_string: private final SecurityContextStatementContext securityContextStatementContext;
focal_class.type: SecurityContextStatementContext
focal_class.var_name: securityContextStatementContext
focal_class.declarator: resourceDescriptionStatementContext
focal_class.modifier: private final
focal_class.original_string: private final ResourceDescriptionStatementContext resourceDescriptionStatementContext;
focal_class.type: ResourceDescriptionStatementContext
focal_class.var_name: resourceDescriptionStatementContext
focal_class.declarator: depth
focal_class.modifier: private final
focal_class.original_string: private final int depth;
focal_class.type: int
focal_class.var_name: depth
focal_class.declarator: locale
focal_class.modifier: private final
focal_class.original_string: private final String locale;
focal_class.type: String
focal_class.var_name: locale
focal_class.file: meta/src/main/java/org/jboss/hal/meta/processing/CreateRrdOperations.java
focal_class.identifier: CreateRrdOperations
focal_class.class_method_signature: CreateRrdOperations.CreateRrdOperations(Environment environment, StatementContext statementContext, String locale, int depth)
focal_class.full_signature:   CreateRrdOperations(Environment environment, StatementContext statementContext, String locale, int depth)
focal_class.identifier: CreateRrdOperations
focal_class.parameters: (Environment environment, StatementContext statementContext, String locale, int depth)
focal_class.signature:  CreateRrdOperations(Environment environment, StatementContext statementContext, String locale, int depth)
focal_class.class_method_signature: CreateRrdOperations.create(LookupContext context, boolean recursive, boolean optional)
focal_class.full_signature: public List<Operation> create(LookupContext context, boolean recursive, boolean optional)
focal_class.identifier: create
focal_class.modifiers: public
focal_class.parameters: (LookupContext context, boolean recursive, boolean optional)
focal_class.return: List<Operation>
focal_class.signature: List<Operation> create(LookupContext context, boolean recursive, boolean optional)
focal_method.body: public List<Operation> create(LookupContext context, boolean recursive, boolean optional) {
          LookupResult lookupResult = context.lookupResult;
          List<Operation> operations = new ArrayList<>();
          lookupResult.templates().stream()
                  .filter(template -> optional == template.isOptional())
                  .forEach(template -> {
                      int missingMetadata = lookupResult.missingMetadata(template);
                      if (missingMetadata != ALL_PRESENT) {
  
                          ResourceAddress address;
                          Operation.Builder builder = null;
  
                          if (missingMetadata == NOTHING_PRESENT) {
                              address = template.resolve(securityContextStatementContext);
                              builder = new Operation.Builder(address, READ_RESOURCE_DESCRIPTION_OPERATION)
                                      .param(ACCESS_CONTROL, COMBINED_DESCRIPTIONS)
                                      .param(OPERATIONS, true);
  
                          } else if (missingMetadata == RESOURCE_DESCRIPTION_PRESENT) {
                              address = template.resolve(securityContextStatementContext);
                              builder = new Operation.Builder(address, READ_RESOURCE_DESCRIPTION_OPERATION)
                                      .param(ACCESS_CONTROL, TRIM_DESCRIPTIONS)
                                      .param(OPERATIONS, true);
  
                          } else if (missingMetadata == SECURITY_CONTEXT_PRESENT) {
                              address = template.resolve(resourceDescriptionStatementContext);
                              builder = new Operation.Builder(address, READ_RESOURCE_DESCRIPTION_OPERATION)
                                      .param(OPERATIONS, true);
                          }
  
                          if (builder != null) {
                              if (recursive) {
                                  builder.param(RECURSIVE_DEPTH, depth);
                              }
                              builder.param(LOCALE, locale);
                              operations.add(builder.build());
                          }
                      }
                  });
          return operations;
      }
focal_method.class_method_signature: CreateRrdOperations.create(LookupContext context, boolean recursive, boolean optional)
focal_method.full_signature: public List<Operation> create(LookupContext context, boolean recursive, boolean optional)
focal_method.identifier: create
focal_method.invocations: forEach filter stream templates isOptional missingMetadata resolve param param resolve param param resolve param param param add build
focal_method.modifiers: public
focal_method.parameters: (LookupContext context, boolean recursive, boolean optional)
focal_method.return: List<Operation>
focal_method.signature: List<Operation> create(LookupContext context, boolean recursive, boolean optional)