IdRepoAttributeValidatorManager.java revision 8af80418ba1ec431c8027fa9668e5678658d3611
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: IdRepoAttributeValidatorManager.java,v 1.2 2010/01/26 00:04:38 hengming Exp $
*/
/**
* The <code>IdRepoAttributeValidatorManager</code> class manages
* <code>IdRepoAttributeValidator</code> for realm.
*/
public class IdRepoAttributeValidatorManager implements ServiceListener {
static final String ATTR_IDREPO_ATTRIBUTE_VALIDATOR =
"sunIdRepoAttributeValidator";
static boolean initializedListeners;
private IdRepoAttributeValidatorManager() {
// Initialize listeners
if (debug.messageEnabled()) {
"constructor called");
}
}
/**
* Returns an instance of <code>IdRepoAttributeValidatorManager</code>
* @return an instance of <code>IdRepoAttributeValidatorManager</code>
*/
public static IdRepoAttributeValidatorManager getInstance() {
synchronized (debug) {
instance = new IdRepoAttributeValidatorManager();
}
}
}
return instance;
}
/**
* Returns an instance of <code>IdRepoAttributeValidator</code> for
* specified realm.
* @param realm the realm
* @return an instance of <code>IdRepoAttributeValidator</code>
* @throws IdRepoException if there are repository related error conditions.
*/
throws IdRepoException {
return validator;
}
synchronized (validatorCache) {
try {
null);
if (index != -1) {
} else {
}
}
}
}
if (debug.warningEnabled()) {
"initializeListeners:", ex);
}
}
validator = new IdRepoAttributeValidatorImpl();
}
}
return validator;
}
private void initializeListeners() {
// Add listeners to Service Schema and Config Managers
if (debug.messageEnabled()) {
"initializeListeners: setting up ServiceListener");
}
try {
// Initialize schema objects
} catch (SMSException smse) {
smse);
} catch (SSOException ssoe) {
ssoe);
}
}
/**
* Notification for global config changes to IdRepoService
*/
}
/**
* Notification for organization config changes to IdRepoService
*/
}
/**
* Notification for schema changes to IdRepoService
*/
if (debug.messageEnabled()) {
"Service name = " + serviceName);
}
synchronized(validatorCache) {
}
}
}