@throws PageException
769998
private void doUpdateDatasource() throws PageException {
	int allow = (getBoolV("allowed_select", false) ? DataSource.ALLOW_SELECT : 0) + (getBoolV("allowed_insert", false) ? DataSource.ALLOW_INSERT : 0)
		+ (getBoolV("allowed_update", false) ? DataSource.ALLOW_UPDATE : 0) + (getBoolV("allowed_delete", false) ? DataSource.ALLOW_DELETE : 0)
		+ (getBoolV("allowed_alter", false) ? DataSource.ALLOW_ALTER : 0) + (getBoolV("allowed_drop", false) ? DataSource.ALLOW_DROP : 0)
		+ (getBoolV("allowed_revoke", false) ? DataSource.ALLOW_REVOKE : 0) + (getBoolV("allowed_grant", false) ? DataSource.ALLOW_GRANT : 0)
		+ (getBoolV("allowed_create", false) ? DataSource.ALLOW_CREATE : 0);
	if (allow == 0) allow = DataSource.ALLOW_ALL;

	String cn = getString("admin", action, "classname");
	if ("com.microsoft.jdbc.sqlserver.SQLServerDriver".equals(cn)) {
	    cn = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
	}

	ClassDefinition cd = new ClassDefinitionImpl(cn, getString("bundleName", null), getString("bundleVersion", null), config.getIdentification());

	// customParameterSyntax
	Struct sct = getStruct("customParameterSyntax", null);
	ParamSyntax ps = (sct != null && sct.containsKey("delimiter") && sct.containsKey("separator")) ? ParamSyntax.toParamSyntax(sct) : ParamSyntax.DEFAULT;

	//
	boolean literalTimestampWithTSOffset = getBoolV("literalTimestampWithTSOffset", false);
	boolean alwaysSetTimeout = getBoolV("alwaysSetTimeout", false);

	String id = getString("id", null);
	String dsn = getString("admin", action, "dsn");
	String name = getString("admin", action, "name");
	String newName = getString("admin", action, "newName");
	String username = getString("admin", action, "dbusername");
	String password = getString("admin", action, "dbpassword");
	String host = getString("host", "");
	String timezone = getString("timezone", "");
	String database = getString("database", "");
	int port = getInt("port", -1);
	int connLimit = getInt("connectionLimit", -1);
	int connTimeout = getInt("connectionTimeout", -1);
	long metaCacheTimeout = getLong("metaCacheTimeout", 60000);
	boolean blob = getBoolV("blob", false);
	boolean clob = getBoolV("clob", false);
	boolean validate = getBoolV("validate", false);
	boolean storage = getBoolV("storage", false);
	boolean verify = getBoolV("verify", true);
	Struct custom = getStruct("custom", new StructImpl());
	String dbdriver = getString("dbdriver", "");

	// config.getDatasourceConnectionPool().remove(name);
	DataSource ds = null;
	try {
	    ds = new DataSourceImpl(config, name, cd, host, dsn, database, port, username, password, null, connLimit, connTimeout, metaCacheTimeout, blob, clob, allow, custom,
		    false, validate, storage, null, dbdriver, ps, literalTimestampWithTSOffset, alwaysSetTimeout, config.getLog("application"));
	}
	catch (Exception e) {
	    throw Caster.toPageException(e);
	}

	if (verify) _doVerifyDatasource(ds, username, password);
	// print.out("limit:"+connLimit);
	admin.updateDataSource(id, name, newName, cd, dsn, username, password, host, database, port, connLimit, connTimeout, metaCacheTimeout, blob, clob, allow, validate, storage,
		timezone, custom, dbdriver, ps, literalTimestampWithTSOffset, alwaysSetTimeout);
	store();
	adminSync.broadcast(attributes, config);
    }
1111828
private void doUpdateMailServer() throws PageException {

	admin.updateMailServer(getInt("id", -1), getString("admin", action, "hostname"), getString("admin", action, "dbusername"), getString("admin", action, "dbpassword"),
		Caster.toIntValue(getString("admin", action, "port")), getBoolV("tls", false), getBoolV("ssl", false), toTimeout(getObject("life", null), 1000 * 60 * 5),
		toTimeout(getObject("idle", null), 1000 * 60 * 5), getBoolV("reuseConnection", true)

	);
	store();
	adminSync.broadcast(attributes, config);
    }
1290838
private void doRemoveMapping() throws PageException {
	admin.removeMapping(getString("admin", action, "virtual"));
	store();
	adminSync.broadcast(attributes, config);
    }
114754
private void doSet() throws PageException {
	if (entry == null) throw new ApplicationException("attribute entry is required for tag registry, when action is [set]");
	if (type == RegistryEntry.TYPE_ANY) type = RegistryEntry.TYPE_STRING;
	if (value == null) {
	    if (type == RegistryEntry.TYPE_DWORD) value = "0";
	    else value = "";
	}

	try {
	    RegistryQuery.setValue(branch, entry, type, value);
	}
	catch (Exception e) {
	    throw Caster.toPageException(e);
	}

    }
525598
@Override
    public void init(PageContext pc) throws IOException {
	if (init != null) {
	    try {
		init.invoke(monitor, new Object[] { pc });
	    }
	    catch (Exception e) {
		throw ExceptionUtil.toIOException(e);
	    }
	}
    }
1242074
private void doRemoveComponentMapping() throws PageException {
	admin.removeComponentMapping(getString("admin", action, "virtual"));
	store();
	adminSync.broadcast(attributes, config);
    }
1304157
private void doGetTLDs() throws PageException {
	lucee.runtime.type.Query qry = new QueryImpl(
		new String[] { "displayname", "namespace", "namespaceseparator", "shortname", "type", "description", "uri", "elclass", "elBundleName", "elBundleVersion",
			"source" },
		new String[] { "varchar", "varchar", "varchar", "varchar", "varchar", "varchar", "varchar", "varchar", "varchar", "varchar", "varchar" }, 0, "tlds");

	int dialect = "lucee".equalsIgnoreCase(getString("dialect", "cfml")) ? CFMLEngine.DIALECT_LUCEE : CFMLEngine.DIALECT_CFML;

	TagLib[] libs = config.getTLDs(dialect);
	for (int i = 0; i < libs.length; i++) {
	    qry.addRow();
	    qry.setAt("displayname", i + 1, libs[i].getDisplayName());
	    qry.setAt("namespace", i + 1, libs[i].getNameSpace());
	    qry.setAt("namespaceseparator", i + 1, libs[i].getNameSpaceSeparator());
	    qry.setAt("shortname", i + 1, libs[i].getShortName());
	    qry.setAt("type", i + 1, libs[i].getType());
	    qry.setAt("description", i + 1, libs[i].getDescription());
	    qry.setAt("uri", i + 1, Caster.toString(libs[i].getUri()));
	    qry.setAt("elclass", i + 1, libs[i].getELClassDefinition().getClassName());
	    qry.setAt("elBundleName", i + 1, libs[i].getELClassDefinition().getName());
	    qry.setAt("elBundleVersion", i + 1, libs[i].getELClassDefinition().getVersionAsString());
	    qry.setAt("source", i + 1, StringUtil.emptyIfNull(libs[i].getSource()));
	}
	pageContext.setVariable(getString("admin", action, "returnVariable"), qry);
    }
32467
public void setEnddate(Object enddate) throws PageException {
	if (StringUtil.isEmpty(enddate)) return;
	this.enddate = new DateImpl(DateCaster.toDateAdvanced(enddate, pageContext.getTimeZone()));
    }
474115
private void doUpdate() throws PageException, SearchException, IOException {
	// check attributes
	required("index", action, "collection", collection);
	required("index", action, "key", key);

	if (type == -1) type = (query == null) ? SearchIndex.TYPE_FILE : SearchIndex.TYPE_CUSTOM;

	if (type == SearchIndex.TYPE_CUSTOM) {
	    required("index", action, "body", body);
	    // required("index",action,"query",query);
	}
	IndexResult result;

	result = collection.index(pageContext, key, type, urlpath, title, body, language, extensions, query, recurse, categoryTree, category, timeout, custom1, custom2, custom3,
		custom4);
	if (!StringUtil.isEmpty(status)) pageContext.setVariable(status, toStruct(result));
    }
962633
public void actionUpload() throws PageException {
	FormItem item = getFormItem(pageContext, filefield);
	Struct cffile = _actionUpload(pageContext, securityManager, item, strDestination, nameconflict, accept, strict, mode, attributes, acl, serverPassword);
	if (StringUtil.isEmpty(result)) {
	    pageContext.undefinedScope().set(KeyConstants._file, cffile);
	    pageContext.undefinedScope().set("cffile", cffile);
	}
	else {
	    pageContext.setVariable(result, cffile);
	}
    }
1012273
public static void setProperty(Object obj, String prop, Object value) throws PageException {
	boolean done = false;
	try {
	    if (setField(obj, prop, value)) done = true;
	}
	catch (Throwable t) {
	    ExceptionUtil.rethrowIfNecessary(t);
	}
	if (!done) callSetter(obj, prop, value);
    }
1220998
@Override
    public Object get(PageContext pc, Collection.Key key) throws PageException {
	return get(key);
    }
1046870
public function delete()
    {
        if (null === $this->alPage) {
            throw new General\ArgumentIsEmptyException('exception_no_pages_selected_delete_skipped');
        }

        if (0 !== $this->alPage->getIsHome()) {
            throw new PageException\RemoveHomePageException("exception_home_page_cannot_be_removed");
        }

        $this->dispatchBeforeOperationEvent(
            '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Page\BeforePageDeletingEvent',
            PageEvents::BEFORE_DELETE_PAGE,
            array(),
            array(
                'message' => 'exception_page_deleting_aborted',
                'domain' => 'exceptions',
            )
        );

        try {
            $this->pageRepository->startTransaction();
            $this->pageRepository->setRepositoryObject($this->alPage);
            $result = $this->pageRepository->delete();
            if ($result) {
                $eventName = PageEvents::BEFORE_DELETE_PAGE_COMMIT;
                $result = !$this->eventsHandler
                                ->createEvent($eventName, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Page\BeforeDeletePageCommitEvent', array($this, array()))
                                ->dispatch()
                                ->getEvent($eventName)
                                ->isAborted();
            }

            if (false !== $result) {
                $this->pageRepository->commit();

                $this->eventsHandler
                     ->createEvent(PageEvents::AFTER_DELETE_PAGE, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Page\AfterPageDeletedEvent', array($this))
                     ->dispatch();

                return $result;
            }
            $this->pageRepository->rollBack();

            return $result;
        } catch (\Exception $e) {
            if (isset($this->pageRepository) && $this->pageRepository !== null) {
                $this->pageRepository->rollBack();
            }

            throw $e;
        }
    }
729064
private void doGetDefaultSecurityManager() throws PageException {
	ConfigServer cs = ConfigImpl.getConfigServer(config, password);

	SecurityManager dsm = cs.getDefaultSecurityManager();
	_fillSecData(dsm);
    }
436708
private void actionAppend() throws PageException {
	if (output == null) throw new ApplicationException("attribute output is not defined for tag file");
	checkFile(pageContext, securityManager, file, serverPassword, createPath, true, false, true);

	setACL(pageContext, file, acl);
	try {
	    if (!file.exists()) file.createNewFile();
	    String content = Caster.toString(output);
	    if (fixnewline) content = doFixNewLine(content);
	    if (addnewline) content += SystemUtil.getOSSpecificLineSeparator();
	    IOUtil.write(file, content, CharsetUtil.toCharset(charset), true);

	}
	catch (UnsupportedEncodingException e) {
	    throw new ApplicationException("Unsupported Charset Definition [" + charset + "]", e.getMessage());
	}
	catch (IOException e) {
	    throw new ApplicationException("can't write file", e.getMessage());
	}
	setMode(file, mode);
	setAttributes(file, attributes);
    }
8051
private void doUpdateDefaultPassword() throws PageException {
	try {
	    admin.updateDefaultPassword(getString("admin", action, "newPassword"));
	}
	catch (Exception e) {
	    throw Caster.toPageException(e);
	}
	store();
    }
552039
private void doList() throws PageException, SearchException {
	required("collection", action, "name", name);
	// if(StringUtil.isEmpty(name))throw new ApplicationException("for action list attribute name is
	// required");
	pageContext.setVariable(name, getSearchEngine().getCollectionsAsQuery());
    }