Commit e234afb7 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Adding stubs for Clearspace lockout and security audit providers.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9935 b35dd754-fafc-0310-a699-88a17e54d16e
parent 164a074b
/**
* $Revision$
* $Date$
*
* Copyright (C) 2008 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.clearspace;
import org.jivesoftware.openfire.lockout.LockOutProvider;
import org.jivesoftware.openfire.lockout.LockOutFlag;
import org.jivesoftware.openfire.lockout.NotLockedOutException;
/**
* The ClearspaceLockOutProvider uses the UserService web service inside of Clearspace
* to retrieve user properties from Clearspace. One of these properties refers to whether
* the user is disabled or not. In the future we may implement this in a different manner
* that will require less overall communication with Clearspace.
*
* @author Daniel Henninger
*/
public class ClearspaceLockOutProvider implements LockOutProvider {
/**
* Generate a ClearspaceLockOutProvider instance.
*/
public ClearspaceLockOutProvider() {
}
/**
* The ClearspaceLockOutProvider will retrieve lockout information from Clearspace's user properties.
* @see org.jivesoftware.openfire.lockout.LockOutProvider#getDisabledStatus(String)
*/
public LockOutFlag getDisabledStatus(String username) throws NotLockedOutException {
// TODO: Will need to retrieve disabled status and return it.
return null;
}
/**
* The ClearspaceLockOutProvider will set lockouts in Clearspace itself.
* @see org.jivesoftware.openfire.lockout.LockOutProvider#setDisabledStatus(org.jivesoftware.openfire.lockout.LockOutFlag)
*/
public void setDisabledStatus(LockOutFlag flag) {
// TODO: Will need to set disabled status.
}
/**
* The ClearspaceLockOutProvider will set lockouts in Clearspace itself.
* @see org.jivesoftware.openfire.lockout.LockOutProvider#unsetDisabledStatus(String)
*/
public void unsetDisabledStatus(String username) {
// TODO: Will need to unset disabled status.
}
/**
* The ClearspaceLockOutProvider will set lockouts in Clearspace itself.
* @see org.jivesoftware.openfire.lockout.LockOutProvider#isReadOnly()
*/
public boolean isReadOnly() {
return false;
}
/**
* Clearspace only supports a strict "are you disabled or not".
* @see org.jivesoftware.openfire.lockout.LockOutProvider#isDelayedStartSupported()
*/
public boolean isDelayedStartSupported() {
return false;
}
/**
* Clearspace only supports a strict "are you disabled or not".
* @see org.jivesoftware.openfire.lockout.LockOutProvider#isTimeoutSupported()
*/
public boolean isTimeoutSupported() {
return false;
}
}
/**
* $Revision$
* $Date$
*
* Copyright (C) 2008 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.clearspace;
import org.jivesoftware.openfire.security.SecurityAuditProvider;
import org.jivesoftware.openfire.security.SecurityAuditEvent;
import org.jivesoftware.openfire.security.EventNotFoundException;
import java.util.List;
import java.util.Date;
/**
* The ClearspaceSecurityAuditProvider uses the AuditService web service inside of Clearspace
* to send audit logs into Clearspace's own audit handler. It also refers the admin to a URL
* inside the Clearspace admin console where they can view the logs.
*
* @author Daniel Henninger
*/
public class ClearspaceSecurityAuditProvider implements SecurityAuditProvider {
/**
* Generate a ClearspaceSecurityAuditProvider instance.
*/
public ClearspaceSecurityAuditProvider() {
}
/**
* The ClearspaceSecurityAuditProvider will log events into Clearspace via the AuditService
* web service, provided by Clearspace.
* @see org.jivesoftware.openfire.security.SecurityAuditProvider#logEvent(String, String, String)
*/
public void logEvent(String username, String summary, String details) {
// TODO: Will need to log event.
}
/**
* The ClearspaceSecurityAuditProvider does not retrieve audit entries from Clearspace. Instead
* it refers the admin to a URL where they can read the logs.
* @see org.jivesoftware.openfire.security.SecurityAuditProvider#getEvents(String, Integer, Integer, java.util.Date, java.util.Date)
*/
public List<SecurityAuditEvent> getEvents(String username, Integer skipEvents, Integer numEvents, Date startTime, Date endTime) {
// This is not used.
return null;
}
/**
* The ClearspaceSecurityAuditProvider does not retrieve audit entries from Clearspace. Instead
* it refers the admin to a URL where they can read the logs.
* @see org.jivesoftware.openfire.security.SecurityAuditProvider#getEvent(Integer)
*/
public SecurityAuditEvent getEvent(Integer msgID) throws EventNotFoundException {
// This is not used.
return null;
}
/**
* The ClearspaceSecurityAuditProvider does not retrieve audit entries from Clearspace. Instead
* it refers the admin to a URL where they can read the logs.
* @see org.jivesoftware.openfire.security.SecurityAuditProvider#isWriteOnly()
*/
public boolean isWriteOnly() {
return true;
}
/**
* The ClearspaceSecurityAuditProvider does not retrieve audit entries from Clearspace. Instead
* it refers the admin to a URL where they can read the logs.
* @see org.jivesoftware.openfire.security.SecurityAuditProvider#getAuditURL()
*/
public String getAuditURL() {
// TODO: Retrieve proper URL and set.
return null;
}
}
......@@ -48,6 +48,10 @@
"org.jivesoftware.openfire.clearspace.ClearspaceGroupProvider");
JiveGlobals.setXMLProperty("provider.vcard.className",
"org.jivesoftware.openfire.clearspace.ClearspaceVCardProvider");
JiveGlobals.setXMLProperty("provider.lockout.className",
"org.jivesoftware.openfire.clearspace.ClearspaceLockOutProvider");
JiveGlobals.setXMLProperty("provider.securityAudit.className",
"org.jivesoftware.openfire.clearspace.ClearspaceSecurityAuditProvider");
// Redirect to next step.
response.sendRedirect(nextPage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment