org.gatein.common.logging.Logger.isTraceEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(192)

本文整理了Java中org.gatein.common.logging.Logger.isTraceEnabled()方法的一些代码示例,展示了Logger.isTraceEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isTraceEnabled()方法的具体详情如下:
包路径:org.gatein.common.logging.Logger
类名称:Logger
方法名:isTraceEnabled

Logger.isTraceEnabled介绍

暂无

代码示例

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public final Group createGroupInstance() {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "createGroupInstance", null);
  4. }
  5. return new ExtGroup();
  6. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public void createGroup(Group group, boolean broadcast) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "createGroup", new Object[] { "broadcast", broadcast });
  4. }
  5. addChild(null, group, broadcast);
  6. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public Group findGroupById(String groupId) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "findGroupById", new Object[] { "groupId", groupId });
  4. }
  5. org.picketlink.idm.api.Group jbidGroup = orgService.getJBIDMGroup(groupId);
  6. if (jbidGroup == null) {
  7. if (log.isTraceEnabled()) {
  8. Tools.logMethodOut(log, LogLevel.TRACE, "findGroupById", null);
  9. }
  10. return null;
  11. }
  12. Group result = convertGroup(jbidGroup);
  13. if (log.isTraceEnabled()) {
  14. Tools.logMethodOut(log, LogLevel.TRACE, "findGroupById", result);
  15. }
  16. return result;
  17. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. @Override
  2. public User findUserByName(String userName, UserStatus userStatus) throws Exception {
  3. if (log.isTraceEnabled()) {
  4. Tools.logMethodIn(log, LogLevel.TRACE, "findUserByName", new Object[] { "userName", userName, "userStatus",
  5. userStatus });
  6. }
  7. IdentitySession session = service_.getIdentitySession();
  8. User user = getPopulatedUser(userName, session, userStatus);
  9. if (log.isTraceEnabled()) {
  10. Tools.logMethodOut(log, LogLevel.TRACE, "findUserByName", user);
  11. }
  12. return user;
  13. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public LazyPageList findUsersByGroup(String groupId) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "findUsersByGroup", new Object[] { "groupId", groupId });
  4. }
  5. return new LazyPageList(findUsersByGroupId(groupId), 20);
  6. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public LazyPageList findUsers(Query q) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "findUsers", new Object[] { "q", q });
  4. }
  5. ListAccess list = findUsersByQuery(q);
  6. return new LazyPageList(list, 20);
  7. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Store PLIDM root group
  3. *
  4. * @param ns
  5. * @param rootGroup
  6. */
  7. void putRootGroup(String ns, Group rootGroup) {
  8. Fqn nodeFqn = getFqn(ns, NODE_PLIDM_ROOT_GROUP);
  9. Node ioNode = addNode(nodeFqn);
  10. if (ioNode != null) {
  11. ioNode.put(NODE_OBJECT_KEY, rootGroup);
  12. if (log.isTraceEnabled()) {
  13. log.trace(this.toString() + "GateIn root group stored in cache" + ";namespace=" + ns);
  14. }
  15. }
  16. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Store gatein group id
  3. *
  4. * @param ns
  5. * @param pLIDMId
  6. * @param id
  7. */
  8. void putGtnGroupId(String ns, String pLIDMId, String id) {
  9. Fqn nodeFqn = getFqn(ns, NODE_GTN_GROUP_ID, pLIDMId);
  10. Node ioNode = addNode(nodeFqn);
  11. if (ioNode != null) {
  12. ioNode.put(NODE_OBJECT_KEY, id);
  13. if (log.isTraceEnabled()) {
  14. log.trace(this.toString() + "GateIn group id cached. PLIDM group id: " + pLIDMId + "GateIn group id: " + id
  15. + ";namespace=" + ns);
  16. }
  17. }
  18. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Retrieve PLIDM root group
  3. *
  4. * @param ns
  5. * @return
  6. */
  7. Group getRootGroup(String ns) {
  8. Fqn nodeFqn = getFqn(ns, NODE_PLIDM_ROOT_GROUP);
  9. Node node = getNode(nodeFqn);
  10. if (node != null) {
  11. Group rootGroup = (Group) node.get(NODE_OBJECT_KEY);
  12. if (log.isTraceEnabled() && rootGroup != null) {
  13. log.trace(this.toString() + "GateIn root group found in cache" + ";namespace=" + ns);
  14. }
  15. return rootGroup;
  16. }
  17. return null;
  18. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public void saveGroup(Group group, boolean broadcast) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "saveGroup", new Object[] { "group", group, "broadcast", broadcast });
  4. }
  5. if (broadcast) {
  6. preSave(group, false);
  7. }
  8. persistGroup(group);
  9. if (broadcast) {
  10. postSave(group, false);
  11. }
  12. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Retrieve gatein group id
  3. *
  4. * @param ns
  5. * @param pLIDMId
  6. * @return
  7. */
  8. String getGtnGroupId(String ns, String pLIDMId) {
  9. Fqn nodeFqn = getFqn(ns, NODE_GTN_GROUP_ID, pLIDMId);
  10. Node node = getNode(nodeFqn);
  11. if (node != null) {
  12. String id = (String) node.get(NODE_OBJECT_KEY);
  13. if (log.isTraceEnabled() && id != null) {
  14. log.trace(this.toString() + "GateIn group id found in cache. PLIDM group id: " + pLIDMId + "GateIn group id: "
  15. + id + ";namespace=" + ns);
  16. }
  17. return id;
  18. }
  19. return null;
  20. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public void createMembership(Membership m, boolean broadcast) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "createMembership",
  4. new Object[] { "membership", m, "broadcast", broadcast, });
  5. }
  6. if (broadcast) {
  7. preSave(m, true);
  8. }
  9. saveMembership(m, false);
  10. if (broadcast) {
  11. postSave(m, true);
  12. }
  13. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public MembershipType saveMembershipType(MembershipType mt, boolean broadcast) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "saveMembershipType", new Object[] { "membershipType", mt, "broadcast",
  4. broadcast });
  5. }
  6. Date now = new Date();
  7. mt.setModifiedDate(now);
  8. if (broadcast) {
  9. preSave(mt, false);
  10. }
  11. updateMembershipType(mt);
  12. if (broadcast) {
  13. postSave(mt, false);
  14. }
  15. return mt;
  16. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public MembershipType findMembershipType(String name) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "findMembershipType", new Object[] { "name", name });
  4. }
  5. RoleType rt = null;
  6. try {
  7. rt = getIdentitySession().getRoleManager().getRoleType(name);
  8. } catch (Exception e) {
  9. handleException("Identity error when finding membership type " + name, e);
  10. }
  11. MembershipType mt = null;
  12. if (rt != null) {
  13. mt = new MembershipTypeImpl(name, null, null);
  14. populateMembershipType(mt);
  15. }
  16. if (log.isTraceEnabled()) {
  17. Tools.logMethodOut(log, LogLevel.TRACE, "findMembershipType", mt);
  18. }
  19. return mt;
  20. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Store IDMUserListAccess
  3. *
  4. * @param ns
  5. * @param query
  6. * @param list
  7. */
  8. void putGtnUserLazyPageList(String ns, Query query, IDMUserListAccess list, UserStatus userStatus) {
  9. Fqn nodeFqn = getFqn(ns, USER_QUERY_NODE, getQueryKey(query, userStatus));
  10. Node ioNode = addNode(nodeFqn);
  11. if (ioNode != null) {
  12. ioNode.put(NODE_OBJECT_KEY, list);
  13. if (log.isTraceEnabled()) {
  14. log.trace(this.toString() + "GateIn user query list cached. Query: " + getQueryKey(query, userStatus) + ";namespace=" + ns);
  15. }
  16. }
  17. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Retrieve IDMUserListAccess
  3. *
  4. * @param ns
  5. * @param query
  6. * @return LazyPageList
  7. */
  8. IDMUserListAccess getGtnUserLazyPageList(String ns, Query query, UserStatus userStatus) {
  9. Fqn nodeFqn = getFqn(ns, USER_QUERY_NODE, getQueryKey(query, userStatus));
  10. Node node = getNode(nodeFqn);
  11. if (node != null) {
  12. IDMUserListAccess list = (IDMUserListAccess) node.get(NODE_OBJECT_KEY);
  13. if (log.isTraceEnabled() && list != null) {
  14. log.trace(this.toString() + "GateIn user query list found in cache. Query: " + getQueryKey(query, userStatus)
  15. + ";namespace=" + ns);
  16. }
  17. return list;
  18. }
  19. return null;
  20. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public int getSize() throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "getSize", null);
  4. }
  5. int result = 0;
  6. if (size < 0) {
  7. if (group != null && user == null) {
  8. result = getIDMService().getIdentitySession().getRoleManager().getRolesCount(group, null, null);
  9. } else if (group == null && user != null) {
  10. result = getIDMService().getIdentitySession().getRoleManager().getRolesCount(user, null, null);
  11. }
  12. size = result;
  13. } else {
  14. result = size;
  15. }
  16. if (log.isTraceEnabled()) {
  17. Tools.logMethodOut(log, LogLevel.TRACE, "getSize", result);
  18. }
  19. return result;
  20. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public LazyPageList<User> getUserPageList(int pageSize) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "getUserPagetList", new Object[] { "pageSize", pageSize });
  4. }
  5. UserQueryBuilder qb = service_.getIdentitySession().createUserQueryBuilder();
  6. boolean enabledOnly = filterDisabledUsersInQueries();
  7. if (enabledOnly) {
  8. qb = addDisabledUserFilter(qb);
  9. }
  10. return new LazyPageList<User>(new IDMUserListAccess(qb, pageSize, true, enabledOnly ? UserStatus.ENABLED : UserStatus.DISABLED), pageSize);
  11. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public void saveUser(User user, boolean broadcast) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "saveUser", new Object[] { "user", user, "broadcast", broadcast });
  4. }
  5. if (user != null && !user.isEnabled()) {
  6. throw new DisabledUserException(user.getUserName());
  7. }
  8. IdentitySession session = service_.getIdentitySession();
  9. if (broadcast) {
  10. preSave(user, false);
  11. }
  12. persistUserInfo(user, session, false);
  13. if (broadcast) {
  14. postSave(user, false);
  15. }
  16. }

代码示例来源:origin: exoplatform/platform

  1. @Override
  2. public void execute(Event<UIComponent> event) throws Exception {
  3. UIComponent ui = event.getSource();
  4. super.execute(event);
  5. AuthenticationRegistry authRegistry = event.getSource().getApplicationComponent(AuthenticationRegistry.class);
  6. HttpServletRequest httpRequest = Util.getPortalRequestContext().getRequest();
  7. // Clear whole context of OAuth login. See OAuthAuthenticationFilter.cleanAuthenticationContext
  8. authRegistry.removeAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_OAUTH_PRINCIPAL);
  9. authRegistry.removeAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_PORTAL_USER);
  10. authRegistry.removeAttributeOfClient(httpRequest, OAuthConst.ATTRIBUTE_AUTHENTICATED_PORTAL_USER_DETECTED);
  11. UIRegisterOAuth uiOauth = ui.getAncestorOfType(UIRegisterOAuth.class);
  12. if(uiOauth != null) {
  13. uiOauth.portalUser = null;
  14. }
  15. if (log.isTraceEnabled()) {
  16. log.trace("Registration with OAuth properties terminated. Clearing authentication context");
  17. }
  18. }
  19. }

相关文章