Adds the digester rules for the defaultaccesscontrol node.<p>

@param digester the digester object
426828
protected void addDefaultAccessControlRules(Digester digester) {

        digester.addObjectCreate(
            "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_DEFAULTACCESSCONTROL + "/" + N_ACCESSCONTROL,
            CmsExplorerTypeAccess.class);
        digester.addSetNext(
            "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_DEFAULTACCESSCONTROL + "/" + N_ACCESSCONTROL,
            "setDefaultAccess");

        digester.addCallMethod(
            "*/"
                + N_WORKPLACE
                + "/"
                + N_EXPLORERTYPES
                + "/"
                + N_DEFAULTACCESSCONTROL
                + "/"
                + N_ACCESSCONTROL
                + "/"
                + N_ACCESSENTRY,
            "addAccessEntry",
            2);
        digester.addCallParam(
            "*/"
                + N_WORKPLACE
                + "/"
                + N_EXPLORERTYPES
                + "/"
                + N_DEFAULTACCESSCONTROL
                + "/"
                + N_ACCESSCONTROL
                + "/"
                + N_ACCESSENTRY,
            0,
            A_PRINCIPAL);
        digester.addCallParam(
            "*/"
                + N_WORKPLACE
                + "/"
                + N_EXPLORERTYPES
                + "/"
                + N_DEFAULTACCESSCONTROL
                + "/"
                + N_ACCESSCONTROL
                + "/"
                + N_ACCESSENTRY,
            1,
            A_PERMISSIONS);
    }
1029436
public static CmsModule readModuleFromImport(String importResource) throws CmsConfigurationException {

        // instantiate Digester and enable XML validation
        Digester digester = new Digester();
        digester.setUseContextClassLoader(true);
        digester.setValidating(false);
        digester.setRuleNamespaceURI(null);
        digester.setErrorHandler(new CmsXmlErrorHandler(importResource));

        // add this class to the Digester
        CmsModuleImportExportHandler handler = new CmsModuleImportExportHandler();
        final String[] version = new String[] {null};
        digester.push(handler);

        digester.addRule("*/export_version", new Rule() {

            @Override
            public void body(String namespace, String name, String text) throws Exception {

                version[0] = text.trim();
            }

        });
        CmsModuleXmlHandler.addXmlDigesterRules(digester);

        InputStream stream = null;
        ZipFile importZip = null;

        try {
            File file = new File(importResource);
            if (file.isFile()) {
                importZip = new ZipFile(importResource);
                ZipEntry entry = importZip.getEntry(CmsImportExportManager.EXPORT_MANIFEST);
                if (entry != null) {
                    stream = importZip.getInputStream(entry);
                } else {
                    CmsMessageContainer message = Messages.get().container(
                        Messages.ERR_NO_MANIFEST_MODULE_IMPORT_1,
                        importResource);
                    LOG.error(message.key());
                    throw new CmsConfigurationException(message);
                }
            } else if (file.isDirectory()) {
                file = new File(file, CmsImportExportManager.EXPORT_MANIFEST);
                stream = new FileInputStream(file);
            }

            // start the parsing process
            digester.parse(stream);
        } catch (IOException e) {
            CmsMessageContainer message = Messages.get().container(Messages.ERR_IO_MODULE_IMPORT_1, importResource);
            LOG.error(message.key(), e);
            throw new CmsConfigurationException(message, e);
        } catch (SAXException e) {
            CmsMessageContainer message = Messages.get().container(Messages.ERR_SAX_MODULE_IMPORT_1, importResource);
            LOG.error(message.key(), e);
            throw new CmsConfigurationException(message, e);
        } finally {
            try {
                if (importZip != null) {
                    importZip.close();
                }
                if (stream != null) {
                    stream.close();
                }
            } catch (Exception e) {
                // noop
            }
        }

        CmsModule importedModule = handler.getModule();
        // the digester must have set the module now
        if (importedModule == null) {
            throw new CmsConfigurationException(
                Messages.get().container(Messages.ERR_IMPORT_MOD_ALREADY_INSTALLED_1, importResource));
        } else {
            importedModule.setExportVersion(version[0]);
        }

        return importedModule;
    }
42046
public void setAccessControlList(java.util.Collection<Grant> accessControlList) {
        if (accessControlList == null) {
            this.accessControlList = null;
            return;
        }

        this.accessControlList = new java.util.ArrayList<Grant>(accessControlList);
    }
1094559
protected void setupDefaultSettings(GsonBuilder builder) {
        registerStringAdapter(builder);
        registerNumberAdapter(builder);
        registerJava8TimeAdapter(builder);
        registerBooleanAdapter(builder);
        registerCollectionAdapter(builder);
        registerDBFluteAdapter(builder);
        registerUtilDateFormat(builder);
        setupFieldPolicy(builder);
        setupYourCollectionSettings(builder);
        setupYourScalarSettings(builder);
        setupYourUltimateSettings(builder);
    }
962607
public void setRolePolicyList(java.util.Collection<PolicyDetail> rolePolicyList) {
        if (rolePolicyList == null) {
            this.rolePolicyList = null;
            return;
        }

        this.rolePolicyList = new com.amazonaws.internal.SdkInternalList<PolicyDetail>(rolePolicyList);
    }
197482
private static void addXmlDigesterRulesForVersion5Modules(Digester digester) {

        // mark method
        digester.addCallMethod("*/" + N_MODULE + "/author", "setOldModule");

        // base module information
        digester.addCallParam("*/" + N_MODULE + "/author", 10);
        digester.addCallParam("*/" + N_MODULE + "/email", 11);
        digester.addCallParam("*/" + N_MODULE + "/creationdate", 12);

        // dependencies
        digester.addCallParam("*/" + N_MODULE + "/dependencies/dependency/name", 0);
        digester.addCallParam("*/" + N_MODULE + "/dependencies/dependency/minversion", 1);

        // export points
        digester.addCallMethod("*/" + N_MODULE + "/exportpoint", "addExportPoint", 2);
        digester.addCallParam("*/" + N_MODULE + "/exportpoint/source", 0);
        digester.addCallParam("*/" + N_MODULE + "/exportpoint/destination", 1);

        // parameters
        digester.addCallMethod("*/" + N_MODULE + "/parameters/para", "addParameter", 2);
        digester.addCallParam("*/" + N_MODULE + "/parameters/para/name", 0);
        digester.addCallParam("*/" + N_MODULE + "/parameters/para/value", 1);
    }
496175
@Override
    public void updateDigest(MessageDigest digest)
    {
        digest.update(name().toByteBuffer().duplicate());
        // We don't take the deltas into account in a digest
        contextManager.updateDigest(digest, value());

        FBUtilities.updateWithLong(digest, timestamp);
        FBUtilities.updateWithByte(digest, serializationFlags());
        FBUtilities.updateWithLong(digest, timestampOfLastDelete);
    }
91546
public void addConfiguredDistributer(final DistributerDef distributer) {
    if (distributer == null) {
      throw new NullPointerException("distributer");
    }
    distributer.setProject(getProject());
    this.distributers.addElement(distributer);
  }
667777
public Digester init(String algorithm, Provider provider) {
		if(null == provider) {
			this.digest = SecureUtil.createMessageDigest(algorithm);
		}else {
			try {
				this.digest = MessageDigest.getInstance(algorithm, provider);
			} catch (NoSuchAlgorithmException e) {
				throw new CryptoException(e);
			}
		}
		return this;
	}
1368135
public void addXmlDigesterRules(Digester digester) {

        // first accounts
        String xpath = CmsImportExportManager.N_EXPORT + "/" + N_ACCOUNTS + "/" + N_ORGUNITS + "/" + N_ORGUNIT + "/";
        addAccountsOrgunitRules(digester, xpath);
        addAccountsGroupRules(digester, xpath);
        addAccountsUserRules(digester, xpath);
        digester.addCallMethod(
            CmsImportExportManager.N_EXPORT + "/" + N_ACCOUNTS + "/" + N_ORGUNITS + "/" + N_ORGUNIT,
            "setMembership");

        // then resources
        xpath = CmsImportExportManager.N_EXPORT + "/" + N_FILES + "/" + N_FILE + "/";
        addResourceAttributesRules(digester, xpath);
        addResourcePropertyRules(digester, xpath);
        addResourceRelationRules(digester, xpath);
        addResourceAceRules(digester, xpath);
        digester.addCallMethod(CmsImportExportManager.N_EXPORT + "/" + N_FILES + "/" + N_FILE, "increaseCounter");
        digester.addCallMethod(CmsImportExportManager.N_EXPORT + "/" + N_FILES, "importRelations");
        digester.addCallMethod(CmsImportExportManager.N_EXPORT + "/" + N_FILES, "rewriteParseables");

        // and now the organizational unit resources
        digester.addCallMethod(CmsImportExportManager.N_EXPORT + "/" + N_FILES, "associateOrgUnitResources");

        // then projects
        xpath = CmsImportExportManager.N_EXPORT + "/" + N_PROJECTS + "/" + N_PROJECT + "/";
        addProjectRules(digester, xpath);
    }
483312
@Override
    public void addRuleInstances (Digester digester)
    {
        // this creates the appropriate instance when we encounter a
        // <action> tag
        digester.addObjectCreate(_prefix + ACTION_PATH,
                                 ActionSequence.class.getName());

        // grab the name attribute from the <action> tag
        digester.addRule(_prefix + ACTION_PATH, new SetPropertyFieldsRule());

        // grab the other attributes from their respective tags
        digester.addRule(_prefix + ACTION_PATH + "/framesPerSecond",
                         new SetFieldRule("framesPerSecond"));

        CallMethodSpecialRule origin = new CallMethodSpecialRule() {
            @Override
            public void parseAndSet (String bodyText, Object target)
                throws Exception {
                int[] coords = StringUtil.parseIntArray(bodyText);
                if (coords.length != 2) {
                    String errmsg = "Invalid <origin> specification '" +
                        bodyText + "'.";
                    throw new Exception(errmsg);
                }
                ((ActionSequence)target).origin.setLocation(
                    coords[0], coords[1]);
            }
        };
        digester.addRule(_prefix + ACTION_PATH + "/origin", origin);

        CallMethodSpecialRule orient = new CallMethodSpecialRule() {
            @Override
            public void parseAndSet (String bodyText, Object target)
                throws Exception {
                ActionSequence seq = ((ActionSequence)target);
                String[] ostrs = StringUtil.parseStringArray(bodyText);
                seq.orients = new int[ostrs.length];
                for (int ii = 0; ii < ostrs.length; ii++) {
                    int orient = DirectionUtil.fromShortString(ostrs[ii]);
                    if (orient != DirectionCodes.NONE) {
                        seq.orients[ii] = orient;
                    } else {
                        String errmsg = "Invalid orientation specification " +
                            "[index=" + ii + ", orient=" + ostrs[ii] + "].";
                        throw new Exception(errmsg);
                    }
                }
            }
        };
        digester.addRule(_prefix + ACTION_PATH + "/orients", orient);
    }
40578
public void addLoader(I_CmsResourceLoader loader) throws CmsConfigurationException {

        // check if new loaders can still be added
        if (m_frozen) {
            throw new CmsConfigurationException(Messages.get().container(Messages.ERR_NO_CONFIG_AFTER_STARTUP_0));
        }

        // add the loader to the internal list of loaders
        int pos = loader.getLoaderId();
        if (pos >= m_loaders.length) {
            I_CmsResourceLoader[] buffer = new I_CmsResourceLoader[pos * 2];
            System.arraycopy(m_loaders, 0, buffer, 0, m_loaders.length);
            m_loaders = buffer;
        }
        m_loaders[pos] = loader;
        m_loaderList.add(loader);
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_ADD_LOADER_2,
                    loader.getClass().getName(),
                    new Integer(pos)));
        }
    }
608176
protected void fixDigests() {
        Digest digest=fetchDigestsFromAllMembersInSubPartition(gms.view, null);
        Message msg=new Message().putHeader(gms.getId(), new GMS.GmsHeader(GMS.GmsHeader.INSTALL_DIGEST))
          .setBuffer(GMS.marshal(null, digest));
        gms.getDownProtocol().down(msg);
    }
717024
public void addRules(Rules rules) {
        if (logger.isDebugEnabled()) {
            logger.debug("Adding rules -> " + rules);
        }
        addRules(DEFAULT_CONTEXT_ID, rules);
    }
1127543
public final void addDivider(@Nullable final CharSequence title) {
        Divider divider = new Divider();
        divider.setTitle(title);
        adapter.add(divider);
        adaptGridViewHeight();
    }
902592
protected static void addTileSetRuleSet (Digester digester, TileSetRuleSet ruleSet)
    {
        ruleSet.setPrefix("actions" + ActionRuleSet.ACTION_PATH);
        digester.addRuleSet(ruleSet);
        digester.addSetNext(ruleSet.getPath(), "addTileSet", TileSet.class.getName());
    }
419674
@Override
    public void addRole(final String role) {
        CommonHelper.assertNotBlank("role", role);
        this.roles.add(role);
    }