001    /**
002     *  Licensed to the Apache Software Foundation (ASF) under one or more
003     *  contributor license agreements.  See the NOTICE file distributed with
004     *  this work for additional information regarding copyright ownership.
005     *  The ASF licenses this file to You under the Apache License, Version 2.0
006     *  (the "License"); you may not use this file except in compliance with
007     *  the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     *  Unless required by applicable law or agreed to in writing, software
012     *  distributed under the License is distributed on an "AS IS" BASIS,
013     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     *  See the License for the specific language governing permissions and
015     *  limitations under the License.
016     */
017    
018    package org.apache.geronimo.console.util;
019    
020    import java.util.Map;
021    
022    import javax.management.ObjectName;
023    
024    import org.apache.geronimo.kernel.ObjectNameUtil;
025    
026    public class SecurityRealmBean {
027    
028        private ObjectName realmObjectName, configEntryObjName;
029    
030        private String configID, realmName, applicationConfigName;
031    
032        private boolean running;
033    
034        private Map attributes;
035    
036        public SecurityRealmBean(ObjectName realmObjectName,
037                ObjectName configEntryObjName, String configID,
038                String applicationConfigName, String realmName, boolean started,
039                Map attributes) {
040            this.realmObjectName = realmObjectName;
041            this.configEntryObjName = configEntryObjName;
042            this.configID = configID;
043            this.applicationConfigName = applicationConfigName;
044            this.realmName = realmName;
045            this.running = started;
046            this.attributes = attributes;
047        }
048    
049        public SecurityRealmBean(String realmObjectName, String configEntryObjName,
050                String configID, String applicationConfigName, String realmName,
051                boolean started, Map attributes) {
052            this(ObjectNameUtil.getObjectName(realmObjectName), ObjectNameUtil
053                    .getObjectName(configEntryObjName), configID,
054                    applicationConfigName, realmName, started, attributes);
055        }
056    
057        /**
058         * @return Returns the configEntryObjName.
059         */
060        public ObjectName getConfigEntryObjName() {
061            return configEntryObjName;
062        }
063    
064        /**
065         * @return Returns the applicationConfigName.
066         */
067        public String getApplicationConfigName() {
068            return applicationConfigName;
069        }
070    
071        /**
072         * @return Returns the attributes.
073         */
074        public Map getAttributes() {
075            return attributes;
076        }
077    
078        /**
079         * @return Returns the configID.
080         */
081        public String getConfigID() {
082            return configID;
083        }
084    
085        /**
086         * @return Returns the realmName.
087         */
088        public String getRealmName() {
089            return realmName;
090        }
091    
092        /**
093         * @return Returns the realmObjectName.
094         */
095        public ObjectName getRealmObjectName() {
096            return realmObjectName;
097        }
098    
099        /**
100         * @return Returns the running.
101         */
102        public boolean isRunning() {
103            return running;
104        }
105    
106    }