Creates new Environment.

@param name       Environment name.
@param project    Parent Project.
@param attributes Additional attributes that should be set for Environment.
@return Newly created Environment.
10276
public Environment environment(String name, Project project, Map<String, Object> attributes) {
        Environment environment = new Environment(instance);

        environment.setName(name);
        environment.setProject(project);
        addAttributes(environment, attributes);
        environment.save();

        return environment;
    }
38517
@SuppressWarnings("unchecked")
    public static <T> AttributeKey<T> newInstance(String name) {
        return (AttributeKey<T>) pool.newInstance(name);
    }
361860
public AzkabanClientStatus createProject(String projectName,
                                           String description) throws AzkabanClientException {
    AzkabanMultiCallables.CreateProjectCallable callable =
       AzkabanMultiCallables.CreateProjectCallable.builder()
           .client(this)
           .projectName(projectName)
           .description(description)
           .build();

    return runWithRetry(callable, AzkabanClientStatus.class);
  }
1090140
public Goal createGoal(String name, Map<String, Object> attributes) {
        return getInstance().create().goal(name, this, attributes);
    }
169532
public void addToEnvironment(String name, Object value) {
        this.environment.set(name, value);
        this.environmentEntries.put(name, value);
    }
833242
def remove_environment(project_root, environment_name)
      # Check if the environment exist
      return error(_('wizard.environment.name_not_exist')%{environment: environment_name}) unless Bebox::Environment.environment_exists?(project_root, environment_name)
      # Confirm deletion
      return warn(_('wizard.no_changes')) unless confirm_action?(_('wizard.environment.confirm_deletion'))
      # Environment deletion
      environment = Bebox::Environment.new(environment_name, project_root)
      output = environment.remove
      ok _('wizard.environment.deletion_success')
      return output
    end
1159078
def create_new_project(project_name)
      # Check project existence
      (error(_('wizard.project.name_exist')); return false) if project_exists?(Dir.pwd, project_name)
      # Setup the bebox boxes directory
      bebox_boxes_setup
      # Asks to choose an existing box
      current_box = choose_box(get_existing_boxes)
      vagrant_box_base = "#{BEBOX_BOXES_PATH}/#{get_valid_box_uri(current_box)}"
      # Asks user to choose vagrant box provider
      vagrant_box_provider = choose_option(%w{virtualbox vmware}, _('wizard.project.choose_box_provider'))
      # Set default environments
      default_environments = %w{vagrant staging production}
      # Project creation
      project = Bebox::Project.new(project_name, vagrant_box_base, Dir.pwd, vagrant_box_provider, default_environments)
      output = project.create
      ok _('wizard.project.creation_success')%{project_name: project_name}
      return output
    end
621526
public void setEnvironments(java.util.Collection<EnvironmentDescription> environments) {
        if (environments == null) {
            this.environments = null;
            return;
        }

        this.environments = new com.amazonaws.internal.SdkInternalList<EnvironmentDescription>(environments);
    }
625023
@Override
    public void buildEnvironment(Run<?,?> build, EnvVars env) {
        env.put(name,originalFileName);
    }
720144
public Theme createTheme(String name, Map<String, Object> attributes) {
        return getInstance().create().theme(name, this, attributes);
    }
1002530
public static AttributeList setAttributes(String name, HashMap attributes) throws JMException
   {
      MBeanServer server = getMBeanServer();
      ObjectName objName = new ObjectName(name);
      MBeanInfo info = server.getMBeanInfo(objName);
      MBeanAttributeInfo[] attributesInfo = info.getAttributes();
      AttributeList newAttributes = new AttributeList();

      for (int a = 0; a < attributesInfo.length; a++)
      {
         MBeanAttributeInfo attrInfo = attributesInfo[a];
         String attrName = attrInfo.getName();

         if (!attributes.containsKey(attrName))
            continue;

         String value = (String) attributes.get(attrName);
         if (value.equals("null") && server.getAttribute(objName, attrName) == null)
         {
            if (trace)
               log.trace("ignoring 'null' for " + attrName);
            continue;
         }

         String attrType = attrInfo.getType();
         Attribute attr = null;
         try
         {
            Object realValue = PropertyEditors.convertValue(value, attrType);
            attr = new Attribute(attrName, realValue);
         }
         catch (ClassNotFoundException e)
         {
            if (trace)
               log.trace("Failed to load class for attribute: " + attrType, e);
            throw new ReflectionException(e, "Failed to load class for attribute: " + attrType);
         }
         catch (IntrospectionException e)
         {
            if (trace)
               log.trace("Skipped setting attribute: " + attrName + 
                         ", cannot find PropertyEditor for type: " + attrType);
            continue;
         }

         server.setAttribute(objName, attr);
         newAttributes.add(attr);
      }

      return newAttributes;
   }
317305
protected Object createNode(Object name, Map attributes) {
        return createNode(name, attributes, null);
    }
96940
public static Attribute cloneAttribute(String newAttrName, Attribute attr) throws WIMSystemException {
        Attribute newAttr = new BasicAttribute(newAttrName);
        try {
            for (NamingEnumeration<?> neu = attr.getAll(); neu.hasMoreElements();) {
                newAttr.add(neu.nextElement());
            }
        } catch (NamingException e) {
            throw new WIMSystemException(WIMMessageKey.NAMING_EXCEPTION, Tr.formatMessage(tc, WIMMessageKey.NAMING_EXCEPTION, WIMMessageHelper.generateMsgParms(e.toString(true))));
        }
        return newAttr;
    }
950797
@Deprecated
    protected @Nonnull DefaultEnvironment createEnvironment(@Nonnull String... environmentNames) {
        return createEnvironment(() -> Arrays.asList(environmentNames));
    }
281153
public Defect createDefect(String name, Map<String, Object> attributes) {
        return getInstance().create().defect(name, this, attributes);
    }
532490
public static final Nature create(String name)
    {
        Nature nature = fromString(name);
        if (nature == null)
            return new Nature(name);
        return nature;
    }
1005893
AttributeSet withAttributes(Attributes attributes) {

        return new AttributeSet(attributes, this.locale, this.level, this.section, this.printCondition, this.internals);

    }