本文整理汇总了Java中org.apache.directory.fortress.core.model.AuthZ.setReqResult方法的典型用法代码示例。如果您正苦于以下问题:Java AuthZ.setReqResult方法的具体用法?Java AuthZ.setReqResult怎么用?Java AuthZ.setReqResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.directory.fortress.core.model.AuthZ
的用法示例。
在下文中一共展示了AuthZ.setReqResult方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAuthzEntityFromLdapEntry
import org.apache.directory.fortress.core.model.AuthZ; //导入方法依赖的package包/类
/**
* @param le
* @return
* @throws LdapInvalidAttributeValueException
* @throws LdapException
*/
private AuthZ getAuthzEntityFromLdapEntry( Entry le, long sequence ) throws LdapInvalidAttributeValueException
{
// these attrs also on audit bind OC:
AuthZ authZ = new ObjectFactory().createAuthZ();
authZ.setSequenceId( sequence );
authZ.setCreateTimestamp( getAttribute( le, CREATETIMESTAMP ) );
authZ.setCreatorsName( getAttribute( le, CREATORSNAME ) );
authZ.setEntryCSN( getAttribute( le, ENTRYCSN ) );
authZ.setEntryDN( getAttribute( le, ENTRYDN ) );
authZ.setEntryUUID( getAttribute( le, ENTRYUUID ) );
authZ.setHasSubordinates( getAttribute( le, HASSUBORDINATES ) );
authZ.setModifiersName( getAttribute( le, MODIFIERSNAME ) );
authZ.setModifyTimestamp( getAttribute( le, MODIFYTIMESTAMP ) );
authZ.setObjectClass( getAttribute( le, OBJECTCLASS ) );
authZ.setReqAuthzID( getAttribute( le, REQUAUTHZID ) );
authZ.setReqControls( getAttribute( le, REQCONTROLS ) );
authZ.setReqDN( getAttribute( le, REQDN ) );
authZ.setReqEnd( getAttribute( le, REQEND ) );
authZ.setReqResult( getAttribute( le, REQRESULT ) );
authZ.setReqSession( getAttribute( le, REQSESSION ) );
authZ.setReqStart( getAttribute( le, REQSTART ) );
authZ.setReqType( getAttribute( le, REQTYPE ) );
authZ.setStructuralObjectClass( getAttribute( le, STRUCTURALOBJECTCLASS ) );
// these attrs only on audit search OC:
authZ.setReqAttr( getAttribute( le, REQATTR ) );
authZ.setReqAttrsOnly( getAttribute( le, REQATTRSONLY ) );
authZ.setReqDerefAliases( getAttribute( le, REQDREFALIASES ) );
authZ.setReqEntries( getAttribute( le, REQENTRIES ) );
authZ.setReqFilter( getAttribute( le, REQFILTER ) );
authZ.setReqScope( getAttribute( le, REQSCOPE ) );
authZ.setReqSizeLimit( getAttribute( le, REQSIZELIMIT ) );
authZ.setReqTimeLimit( getAttribute( le, REQTIMELIMIT ) );
return authZ;
}
示例2: loadTree
import org.apache.directory.fortress.core.model.AuthZ; //导入方法依赖的package包/类
private void loadTree( List<AuthZ> authZs )
{
for ( AuthZ authZ : authZs )
{
Date start = null;
try
{
start = TUtil.decodeGeneralizedTime( authZ.getReqStart() );
}
catch ( ParseException pe )
{
LOG.warn( "ParseException=" + pe.getMessage() );
}
if ( start != null )
{
SimpleDateFormat formatter = new SimpleDateFormat( GlobalIds.AUDIT_TIMESTAMP_FORMAT );
String formattedDate = formatter.format( start );
authZ.setReqStart( formattedDate );
}
authZ.setReqResult( GlobalIds.FAILURE );
/*
TODO: On RC40 - Replace above line with the following:
if(StringUtils.isNotEmpty( authZ.getReqAssertion() ) && (authZ.getReqAssertion().equals( org.apache.directory.fortress.core.GlobalIds.AUTH_Z_FAILED_VALUE ) ) )
{
authZ.setReqResult( GlobalIds.FAILURE );
}
else
{
authZ.setReqResult( GlobalIds.SUCCESS );
}
*/
authZ.setReqAuthzID( AuditUtils.getAuthZId( authZ.getReqAuthzID() ) );
AuditUtils.mapAuthZPerm( authZ );
rootNode.add( new DefaultMutableTreeNode( authZ ) );
}
}