⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deleteuserstoreaction.java

📁 开源的OpenId的一个java实现
💻 JAVA
字号:
package org.wso2.solutions.identity.admin.ui.action;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.wso2.solutions.identity.IdentityProviderConstants;import org.wso2.solutions.identity.IdentityProviderException;import org.wso2.solutions.identity.admin.RealmConfigAdmin;import org.wso2.solutions.identity.i18n.Messages;import org.wso2.solutions.identity.persistence.dataobject.RealmConfigurationDO;import org.wso2.usermanager.readwrite.DefaultRealm;/** *  * Delete the user store */public class DeleteUserStoreAction        extends ManagedAction {    private static Log log = LogFactory.getLog(DeleteUserStoreAction.class);    private final static Messages messages = Messages            .getInstance(IdentityProviderConstants.RESOURCES);    private String configName = null;    public String execute() throws Exception {        if (configName != null && configName.trim().length() > 0) {            try {                RealmConfigAdmin admin = new RealmConfigAdmin();                RealmConfigurationDO config = admin                        .getRealmConfiguration(this.configName);                                String realmClassName = config.getRealm().getClassName();                if ((!config.isEffective())                        && (!realmClassName.equals(DefaultRealm.class.getName()))) {                    admin.deleteRealmConfiguration(config);                }                                log.info(messages.getMessage("changedDefaultUserStore",                        new String[] { configName }));            } catch (IdentityProviderException e) {                this.addErrorMessage(e.getMessage());            }        } else {            return ERROR;        }        return SUCCESS;    }    public String getConfigName() {        return configName;    }    public void setConfigName(String configName) {        this.configName = configName;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -