Java List Create createDefaultGroup(String name, String prefabGroup, List nodes)

Here you can find the source of createDefaultGroup(String name, String prefabGroup, List nodes)

Description

Creates a default group for all machines to use.

License

Open Source License

Parameter

Parameter Description
name - group name
prefabGroup - group this should extend. Make sure it exists.
nodes - all commands or custom permissions

Declaration

public static void createDefaultGroup(String name, String prefabGroup, List<String> nodes) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    /**//from  ww w .j ava  2  s.  c  om
     * Map of default groups and those group permissions permissions. Used to build a new group set.
     */
    public static final HashMap<String, List<String>> groupDefaultNodes = new LinkedHashMap<String, List<String>>();
    /**
     * Map of default groups and the group it extends. Used to build a new group set.
     */
    public static final HashMap<String, String> groupDefaultExtends = new LinkedHashMap<String, String>();

    /**
     * Creates a default group for all machines to use. Only add a group if there is no option to
     * really manage the group's settings
     *
     * @param name        - group name
     * @param prefabGroup - group this should extend. Make sure it exists.
     * @param nodes       - all commands or custom permissions
     */
    public static void createDefaultGroup(String name, String prefabGroup, List<String> nodes) {
        if (name != null) {
            groupDefaultNodes.put(name, nodes);
            groupDefaultExtends.put(name, prefabGroup);
        }
    }

    /**
     * Creates a default group for all machines to use. Only add a group if there is no option to
     * really manage the group's settings
     *
     * @param name        - group name
     * @param prefabGroup - group this should extend. Make sure it exists.
     * @param nodes       - all commands or custom permissions
     */
    public static void createDefaultGroup(String name, String prefabGroup, String... nodes) {
        createDefaultGroup(name, prefabGroup, nodes != null ? Arrays.asList(nodes) : null);
    }
}

Related

  1. createCommand(LinkedList> list)
  2. createConflictMessage(List conflicts)
  3. createConfusionMatrix(HashMap> tempM, List actualLabelsList, List predictedLabelsList)
  4. createConsultInfoMap(List resAry)
  5. createCSVLine(final char textQ, final char fieldD, final List values)
  6. createDefaultValueList(int capacity, T defaultValue)
  7. createDelimitedString(String rawListAsString)
  8. createDoubleList(double[] values)
  9. createDriverSheetNames(List driverBeans)

  10. HOME | Copyright © www.java2s.com 2016