当前位置: 首页>>代码示例>>Java>>正文


Java UserAudit类代码示例

本文整理汇总了Java中org.apache.directory.fortress.core.model.UserAudit的典型用法代码示例。如果您正苦于以下问题:Java UserAudit类的具体用法?Java UserAudit怎么用?Java UserAudit使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


UserAudit类属于org.apache.directory.fortress.core.model包,在下文中一共展示了UserAudit类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createResponse

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
/**
 * ************************************************************************************************************************************
 * BEGIN AUDIT
 * **************************************************************************************************************************************
 */

/* No qualifier */ FortResponse searchBinds(FortRequest request)
{
    FortResponse response = createResponse();
    
    try
    {
        UserAudit inAudit = (UserAudit) request.getEntity();
        AuditMgr auditMgr = AuditMgrFactory.createInstance( request.getContextId() );
        auditMgr.setAdmin( request.getSession() );
        List<Bind> outAudit = auditMgr.searchBinds( inAudit );
        response.setEntities( outAudit );
    }
    catch ( SecurityException se )
    {
        createError( response, log, se );
    }
    
    return response;
}
 
开发者ID:apache,项目名称:directory-fortress-enmasse,代码行数:26,代码来源:AuditMgrImpl.java

示例2: getUserAuthZs

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
FortResponse getUserAuthZs(FortRequest request)
{
    FortResponse response = createResponse();
    
    try
    {
        UserAudit inAudit = (UserAudit)request.getEntity();
        AuditMgr auditMgr = AuditMgrFactory.createInstance( request.getContextId() );
        auditMgr.setAdmin( request.getSession() );
        List<AuthZ> outAudit = auditMgr.getUserAuthZs( inAudit );
        response.setEntities( outAudit );
    }
    catch (SecurityException se)
    {
        createError( response, log, se );
    }
    
    return response;
}
 
开发者ID:apache,项目名称:directory-fortress-enmasse,代码行数:20,代码来源:AuditMgrImpl.java

示例3: searchAuthZs

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
FortResponse searchAuthZs(FortRequest request)
{
    FortResponse response = createResponse();
    
    try
    {
        UserAudit inAudit = (UserAudit)request.getEntity();
        AuditMgr auditMgr = AuditMgrFactory.createInstance( request.getContextId() );
        auditMgr.setAdmin( request.getSession() );
        List<AuthZ> outAudit = auditMgr.searchAuthZs( inAudit );
        response.setEntities( outAudit );
    }
    catch (SecurityException se)
    {
        createError( response, log, se );
    }

    return response;
}
 
开发者ID:apache,项目名称:directory-fortress-enmasse,代码行数:20,代码来源:AuditMgrImpl.java

示例4: searchUserSessions

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
FortResponse searchUserSessions(FortRequest request)
{
    FortResponse response = createResponse();
    
    try
    {
        UserAudit inAudit = (UserAudit)request.getEntity();
        AuditMgr auditMgr = AuditMgrFactory.createInstance( request.getContextId() );
        auditMgr.setAdmin( request.getSession() );
        List<Mod> outAudit = auditMgr.searchUserSessions( inAudit );
        response.setEntities( outAudit );
    }
    catch (SecurityException se)
    {
        createError( response, log, se );
    }

    return response;
}
 
开发者ID:apache,项目名称:directory-fortress-enmasse,代码行数:20,代码来源:AuditMgrImpl.java

示例5: searchAdminMods

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
FortResponse searchAdminMods(FortRequest request)
{
    FortResponse response = createResponse();
    
    try
    {
        UserAudit inAudit = (UserAudit)request.getEntity();
        AuditMgr auditMgr = AuditMgrFactory.createInstance( request.getContextId() );
        auditMgr.setAdmin( request.getSession() );
        List<Mod> outAudit = auditMgr.searchAdminMods( inAudit );
        response.setEntities( outAudit );
    }
    catch (SecurityException se)
    {
        createError( response, log, se );
    }
    
    return response;
}
 
开发者ID:apache,项目名称:directory-fortress-enmasse,代码行数:20,代码来源:AuditMgrImpl.java

示例6: searchInvalidUsers

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
FortResponse searchInvalidUsers(FortRequest request)
{
    FortResponse response = createResponse();

    try
    {
        UserAudit inAudit = (UserAudit)request.getEntity();
        AuditMgr auditMgr = AuditMgrFactory.createInstance( request.getContextId() );
        auditMgr.setAdmin( request.getSession() );
        List<AuthZ> outAudit = auditMgr.searchInvalidUsers( inAudit );
        response.setEntities( outAudit );
    }
    catch (SecurityException se)
    {
        createError( response, log, se );
    }
    
    return response;
}
 
开发者ID:apache,项目名称:directory-fortress-enmasse,代码行数:20,代码来源:AuditMgrImpl.java

示例7: searchAdminMods

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
@AdminPermissionOperation
public List<Mod> searchAdminMods(UserAudit uAudit)
    throws SecurityException
{
    String methodName = "searchAdminMods";
    assertContext(CLS_NM, methodName, uAudit, GlobalErrIds.AUDT_INPUT_NULL);
    checkAccess(CLS_NM, methodName);
    if ( StringUtils.isNotEmpty( uAudit.getUserId() ))
    {
        ReviewMgr rMgr = ReviewMgrFactory.createInstance(this.contextId);
        User user = rMgr.readUser(new User(uAudit.getUserId()));
        uAudit.setInternalUserId(user.getInternalId());
    }
    return auditP.searchAdminMods(uAudit);
}
 
开发者ID:apache,项目名称:directory-fortress-core,代码行数:20,代码来源:AuditMgrImpl.java

示例8: findBinds

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
/**
 *
 */
void findBinds()
{
    ReaderUtil.clearScreen();
    try
    {
        System.out.println("Enter userId value to search Audit Binds with or null to retrieve all:");
        String val = ReaderUtil.readLn();
        UserAudit uAudit = new UserAudit();
        uAudit.setUserId(val);
        List<Bind> list = am.searchBinds(uAudit);
        printAuthNs(list);
        System.out.println("ENTER to continue");
    }
    catch (SecurityException e)
    {
        LOG.error("findBinds caught SecurityException rc=" + e.getErrorId() + ", msg=" + e.getMessage(), e);
    }
    ReaderUtil.readChar();
}
 
开发者ID:apache,项目名称:directory-fortress-core,代码行数:23,代码来源:AuditMgrConsole.java

示例9: searchAuthNInvalid

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
/**
 *
 * @param msg
 */
private static void searchAuthNInvalid( String msg )
{
    LogUtil.logIt( msg );
    try
    {
        AuditMgr auditMgr = getManagedAuditMgr();
        UserAudit uAudit = new UserAudit();
        List<AuthZ> resultSet = auditMgr.searchInvalidUsers( uAudit );
        assertNotNull( resultSet );
        assertTrue( CLS_NM + "searchInvalidUsers failed search for invalid authentications", resultSet.size() > 0 );
        LOG.debug( "searchInvalidUsers successful" );
    }
    catch ( SecurityException ex )
    {
        LOG.error( "searchInvalidUsers: failed with SecurityException rc=" + ex.getErrorId() + ", msg="
            + ex.getMessage(), ex );
        fail( ex.getMessage() );
    }
}
 
开发者ID:apache,项目名称:directory-fortress-core,代码行数:24,代码来源:AuditMgrImplTest.java

示例10: getList

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
private List<Bind> getList( UserAudit userAudit )
{
    List<Bind> bindList = null;
    
    try
    {
        bindList = auditMgr.searchBinds( userAudit );
    }
    catch ( SecurityException se )
    {
        String error = ".getList caught SecurityException=" + se;
        LOG.warn( error );
    }
    
    return bindList;
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:17,代码来源:AuditBindListModel.java

示例11: getList

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
private List<AuthZ> getList( UserAudit userAudit )
{
    List<AuthZ> authZList = null;
    
    try
    {
        authZList = auditMgr.getUserAuthZs( userAudit );
    }
    catch (org.apache.directory.fortress.core.SecurityException se)
    {
        String error = ".getList caught SecurityException=" + se;
        LOG.warn( error );
    }
    
    return authZList;
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:17,代码来源:AuditAuthzListModel.java

示例12: getPermission

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
private Permission getPermission( UserAudit userAudit )
{
    Permission permission = null;
    
    try
    {
        permission = reviewMgr.readPermission( new Permission ( userAudit.getObjName(), userAudit.getOpName(), userAudit.isAdmin()) );
    }
    catch ( SecurityException se )
    {
        String error = ".getPermission caught SecurityException=" + se;
        LOG.warn( error );
    }
    
    return permission;
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:17,代码来源:AuditAuthzListModel.java

示例13: getList

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
private List<Mod> getList( UserAudit userAudit )
{
    List<Mod> modList = null;
    
    try
    {
        userAudit.setDn( "" );
        
        if ( StringUtils.isNotEmpty( userAudit.getObjName() ) )
        {
            userAudit.setObjName( getTruncatedObjName( userAudit.getObjName() ) );
        }
        
        modList = auditMgr.searchAdminMods( userAudit );
    }
    catch ( org.apache.directory.fortress.core.SecurityException se )
    {
        String error = ".getList caught SecurityException=" + se;
        LOG.warn(error);
        // create empty model object to prevent npe in listview.
        modList = new SerializableList<>( new ArrayList<Mod>() );
    }
    
    return modList;
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:26,代码来源:AuditModListModel.java

示例14: getUser

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
private User getUser( UserAudit userAudit )
{
    User user = null;
    
    try
    {
        user = reviewMgr.readUser( new User ( userAudit.getUserId() ) );
    }
    catch ( SecurityException se )
    {
        String error = ".getUser caught SecurityException=" + se;
        LOG.warn( error );
    }
    
    return user;
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:17,代码来源:AuditModListModel.java

示例15: getUserAuthZs

import org.apache.directory.fortress.core.model.UserAudit; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<AuthZ> getUserAuthZs(UserAudit uAudit)
    throws SecurityException
{
    VUtil.assertNotNull(uAudit, GlobalErrIds.AUDT_INPUT_NULL, CLS_NM + ".getUserAuthZs");
    List<AuthZ> outRecords;
    FortRequest request = new FortRequest();
    request.setContextId(this.contextId);
    request.setEntity(uAudit);
    if (this.adminSess != null)
    {
        request.setSession(adminSess);
    }
    String szRequest = RestUtils.marshal(request);
    String szResponse = RestUtils.getInstance().post(szRequest, HttpIds.AUDIT_UAUTHZS);
    FortResponse response = RestUtils.unmarshall(szResponse);
    if (response.getErrorCode() == 0)
    {
        outRecords = response.getEntities();
        // do not return a null list to the caller:
        if (outRecords == null)
        {
            outRecords = new ArrayList<>();
        }
    }
    else
    {
        throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
    }
    return outRecords;
}
 
开发者ID:apache,项目名称:directory-fortress-core,代码行数:35,代码来源:AuditMgrRestImpl.java


注:本文中的org.apache.directory.fortress.core.model.UserAudit类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。