Search in sources :

Example 1 with DefaultAuthSeqMgtDAOImpl

use of org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl in project carbon-identity-framework by wso2.

the class DefaultAuthSeqMgtServiceImpl method doGetDefaultAuthenticationSeqInfo.

private DefaultAuthenticationSequence doGetDefaultAuthenticationSeqInfo(String sequenceName, String tenantDomain) throws DefaultAuthSeqMgtException {
    DefaultAuthenticationSequence sequence = getDefaultAuthSeqFromCache(sequenceName, tenantDomain);
    if (sequence == null) {
        DefaultAuthSeqMgtDAO seqMgtDAO = new DefaultAuthSeqMgtDAOImpl();
        sequence = seqMgtDAO.getDefaultAuthenticationSeqInfo(sequenceName, tenantDomain);
    }
    return sequence;
}
Also used : DefaultAuthenticationSequence(org.wso2.carbon.identity.application.common.model.DefaultAuthenticationSequence) DefaultAuthSeqMgtDAOImpl(org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl) DefaultAuthSeqMgtDAO(org.wso2.carbon.identity.application.mgt.dao.DefaultAuthSeqMgtDAO)

Example 2 with DefaultAuthSeqMgtDAOImpl

use of org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl in project carbon-identity-framework by wso2.

the class DefaultAuthSeqMgtServiceImpl method doGetDefaultAuthSeq.

private DefaultAuthenticationSequence doGetDefaultAuthSeq(String sequenceName, String tenantDomain) throws DefaultAuthSeqMgtException {
    if (DefaultAuthSeqMgtCache.getInstance().isEnabled()) {
        DefaultAuthSeqMgtCacheEntry entry = DefaultAuthSeqMgtCache.getInstance().getValueFromCache(sequenceName, tenantDomain);
        if (entry != null) {
            if (log.isDebugEnabled()) {
                log.debug("Default authentication sequence of tenant: " + tenantDomain + " is retrieved from cache.");
            }
            return entry.getSequence();
        }
    }
    DefaultAuthSeqMgtDAO seqMgtDAO = new DefaultAuthSeqMgtDAOImpl();
    DefaultAuthenticationSequence sequence = seqMgtDAO.getDefaultAuthenticationSeq(sequenceName, tenantDomain);
    if (sequence != null) {
        addDefaultAuthSeqToCache(sequence, tenantDomain);
    }
    return sequence;
}
Also used : DefaultAuthSeqMgtCacheEntry(org.wso2.carbon.identity.application.mgt.cache.DefaultAuthSeqMgtCacheEntry) DefaultAuthenticationSequence(org.wso2.carbon.identity.application.common.model.DefaultAuthenticationSequence) DefaultAuthSeqMgtDAOImpl(org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl) DefaultAuthSeqMgtDAO(org.wso2.carbon.identity.application.mgt.dao.DefaultAuthSeqMgtDAO)

Example 3 with DefaultAuthSeqMgtDAOImpl

use of org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl in project carbon-identity-framework by wso2.

the class DefaultAuthSeqMgtServiceImpl method doDeleteDefaultAuthSeq.

private void doDeleteDefaultAuthSeq(String sequenceName, String tenantDomain) throws DefaultAuthSeqMgtServerException {
    DefaultAuthSeqMgtDAO seqMgtDAO = new DefaultAuthSeqMgtDAOImpl();
    seqMgtDAO.deleteDefaultAuthenticationSeq(sequenceName, tenantDomain);
    removeDefaultAuthSeqFromCache(sequenceName, tenantDomain);
}
Also used : DefaultAuthSeqMgtDAOImpl(org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl) DefaultAuthSeqMgtDAO(org.wso2.carbon.identity.application.mgt.dao.DefaultAuthSeqMgtDAO)

Example 4 with DefaultAuthSeqMgtDAOImpl

use of org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl in project carbon-identity-framework by wso2.

the class DefaultAuthSeqMgtServiceImpl method doUpdateDefaultAuthSeq.

private void doUpdateDefaultAuthSeq(String sequenceName, DefaultAuthenticationSequence sequence, String tenantDomain) throws DefaultAuthSeqMgtServerException {
    DefaultAuthSeqMgtDAO seqMgtDAO = new DefaultAuthSeqMgtDAOImpl();
    seqMgtDAO.updateDefaultAuthenticationSeq(sequenceName, sequence, tenantDomain);
    addDefaultAuthSeqToCache(sequence, tenantDomain);
}
Also used : DefaultAuthSeqMgtDAOImpl(org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl) DefaultAuthSeqMgtDAO(org.wso2.carbon.identity.application.mgt.dao.DefaultAuthSeqMgtDAO)

Example 5 with DefaultAuthSeqMgtDAOImpl

use of org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl in project carbon-identity-framework by wso2.

the class DefaultAuthSeqMgtServiceImpl method doCreateDefaultAuthSeq.

private void doCreateDefaultAuthSeq(DefaultAuthenticationSequence sequence, String tenantDomain) throws DefaultAuthSeqMgtException {
    DefaultAuthSeqMgtDAO seqMgtDAO = new DefaultAuthSeqMgtDAOImpl();
    seqMgtDAO.createDefaultAuthenticationSeq(sequence, tenantDomain);
    addDefaultAuthSeqToCache(sequence, tenantDomain);
}
Also used : DefaultAuthSeqMgtDAOImpl(org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl) DefaultAuthSeqMgtDAO(org.wso2.carbon.identity.application.mgt.dao.DefaultAuthSeqMgtDAO)

Aggregations

DefaultAuthSeqMgtDAO (org.wso2.carbon.identity.application.mgt.dao.DefaultAuthSeqMgtDAO)6 DefaultAuthSeqMgtDAOImpl (org.wso2.carbon.identity.application.mgt.dao.impl.DefaultAuthSeqMgtDAOImpl)6 DefaultAuthenticationSequence (org.wso2.carbon.identity.application.common.model.DefaultAuthenticationSequence)3 DefaultAuthSeqMgtCacheEntry (org.wso2.carbon.identity.application.mgt.cache.DefaultAuthSeqMgtCacheEntry)1