Sets the policy that determines who may associate children with the node.

@param policy The policy being set
432782
public void setChildrenAssociationPolicy(ChildrenAssociationPolicy policy) {
        addField(ConfigureNodeFields.children_association_policy, FormField.Type.list_single);
        List<String> values = new ArrayList<>(1);
        values.add(policy.toString());
        setAnswer(ConfigureNodeFields.children_association_policy.getFieldName(), values);
    }
1351002
public void setRoles(List<NamedRoleInfo> roles) {
		this.roles = roles;
		List<AuthorizationInfo> authorizations = new ArrayList<AuthorizationInfo>();
		for (NamedRoleInfo role : roles) {
			authorizations.addAll(role.getAuthorizations());
		}
		super.setAuthorizations(authorizations);
	}
664145
private void orderPolicies(PoliciesBean policies) {
        int idx = 1;
        for (PolicyBean policy : policies.getPolicies()) {
            policy.setOrderIndex(idx++);
        }
    }
9510
@NonNull
  public RequestCreator networkPolicy(@NonNull NetworkPolicy policy,
      @NonNull NetworkPolicy... additional) {
    data.networkPolicy(policy, additional);
    return this;
  }
830187
private void getPolicyNodes(int depth, Set<PolicyNodeImpl> set) {
        // if we've reached the desired depth, then return ourself
        if (mDepth == depth) {
            set.add(this);
        } else {
            for (PolicyNodeImpl node : mChildren) {
                node.getPolicyNodes(depth, set);
            }
        }
    }
832086
void prune(int depth) {
        if (isImmutable)
            throw new IllegalStateException("PolicyNode is immutable");

        // if we have no children, we can't prune below us...
        if (mChildren.size() == 0)
            return;

        Iterator<PolicyNodeImpl> it = mChildren.iterator();
        while (it.hasNext()) {
            PolicyNodeImpl node = it.next();
            node.prune(depth);
            // now that we've called prune on the child, see if we should
            // remove it from the tree
            if ((node.mChildren.size() == 0) && (depth > mDepth + 1))
                it.remove();
        }
    }
1365351
public void setChaincodeEndorsementPolicy(LifecycleChaincodeEndorsementPolicy chaincodeEndorsementPolicy) throws InvalidArgumentException {
        if (null == chaincodeEndorsementPolicy) {
            throw new InvalidArgumentException(" The parameter chaincodeEndorsementPolicy may not be null.");
        }
        validationParameter = chaincodeEndorsementPolicy.getByteString();
    }
540235
function (element, policy, attribute) {
        if (policy === POLICY_IN || policy === POLICY_BOTH) {
            element.set(attribute, element.$el[attributeMap[attribute]]);
        }
    }
784574
private void addChildrenByRef(IdReferenceType idReference) {
        String id = idReference.getValue();
        if (id == null || id.isEmpty()) {
            log.debug("Invalid reference to policy or policyset ");
            return;
        }

        Object obj = policyFinder.lookup(id);

        if (obj instanceof PolicyType || obj instanceof PolicySetType) {
            children.add(obj);
        } else {
            log.debug("No policy/policyset found for the reference " + id);
        }
    }
652177
@Override
  public void setChildren(Tree[] children) {
    if (children == null || children.length == 0) {
      this.children = ZERO_TGN_CHILDREN;
    } else {
      if (children instanceof TreeGraphNode[]) {
        this.children = (TreeGraphNode[]) children;
      } else {
        this.children = new TreeGraphNode[children.length];
        for (int i = 0; i < children.length; i++) {
          this.children[i] = (TreeGraphNode)children[i];
        }
      }
    }
  }
984913
public void setRole(java.lang.String role) {
        getStateHelper().put(PropertyKeys.role, role);
        handleAttribute("role", role);
    }
1152193
public void setTerminationPolicies(java.util.Collection<String> terminationPolicies) {
        if (terminationPolicies == null) {
            this.terminationPolicies = null;
            return;
        }

        this.terminationPolicies = new com.amazonaws.internal.SdkInternalList<String>(terminationPolicies);
    }
924116
public function setPolicy(int $policy)
    {
        if (!($policy === Rule::ALLOW || $policy === Rule::DENY || $policy === Rule::INHERIT || $policy === Rule::NOINHERIT))
            throw new Exception("Policy must be either Rule::ALLOW, Rule::DENY, Rule::INHERIT or Rule::NOINHERIT");

        if ($policy === Rule::NOINHERIT && !empty($this->action))
            throw new Exception("Rule::NOINHERIT can not be used in combination with an action");

        if ($policy === Rule::NOINHERIT && !empty($this->role_id))
            throw new Exception("Rule::NOINHERIT can not be used in combination with a role");

        if ($policy !== $this->policy)
        {
            $this->policy = $policy;
            $this->changed = true;
        }
    }
1009104
public void setParameters(java.util.Collection<PolicyParameter> parameters) {
        if (parameters == null) {
            this.parameters = null;
            return;
        }

        this.parameters = new java.util.ArrayList<PolicyParameter>(parameters);
    }
519337
public void addPolicy(final String name, final ExpirationPolicy policy) {
        LOGGER.trace("Adding expiration policy [{}] with name [{}]", policy, name);
        this.policies.put(name, policy);
    }
1083558
public void setPolicyList(java.util.Collection<PolicySummary> policyList) {
        if (policyList == null) {
            this.policyList = null;
            return;
        }

        this.policyList = new java.util.ArrayList<PolicySummary>(policyList);
    }
1234127
public static function setIoErrorPolicy($policy)
    {
        if (!in_array($policy, self::$policyMap, true)) {
            throw new LoggerConfigurationException("Policy '{$policy}' not found");
        }
        self::$ioErrorPolicy = $policy;
    }