AMTokenRepositoryFactory.java revision 9f70e00b4c0aea24675f90732e58a16d17d67635
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2012 ForgeRock US 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 legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at 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 copyright [year] [name of copyright owner]".
*
*/
/**
* <code>AMTokenRepositoryFactory</code> provides a default
* factory for obtaining our Core Token services BackEnd Repository.
*
* ** This is a Package Protected class **
*
* ** This class is sort of duplicated in:
* com.sun.identity.saml2.common.AMTokenRepositoryFactoryAccessor
*
*/
class AMTokenRepositoryFactory {
/**
* Global Definitions.
*/
private static final String DEFAULT_CTS_REPOSITORY_CLASS_NAME =
CTSPersistentStore.class.getName();
/**
* Singleton instance of AM Session Repository or CTS.
*/
/**
* Private, do not allow instantiation.
*/
private AMTokenRepositoryFactory() {
}
/**
* Common Get Instance method to obtain access to
* Service Methods.
*
* @return AMTokenRepository Singleton Instance.
* @throws Exception
*/
protected static AMTokenRepository getInstance()
throws Exception {
if (amTokenRepository == null) {
} else {
throw new IllegalAccessException("Unable to instantiate the CTS Persistent Store as Implementation Class:["+
CTS_REPOSITORY_CLASS_NAME+"], is unknown to OpenAM!");
}
}
return amTokenRepository;
}
}