本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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();
}
示例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() );
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}