forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAK-23634 - Add User Auditing Log that tracks when users were added/r…
…emoved/updated from a site - Doing the new directory items first git-svn-id: https://source.sakaiproject.org/svn/userauditservice/trunk@131983 66ffb92e-73f9-0310-93c1-f5514f145a0a
- Loading branch information
Showing
24 changed files
with
2,054 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.sakaiproject.userauditservice</groupId> | ||
<artifactId>userauditservice</artifactId> | ||
<version>10.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<name>Sakai Userauditservice API (userauditservice-api)</name> | ||
<groupId>org.sakaiproject.userauditservice</groupId> | ||
<artifactId>userauditservice-api</artifactId> | ||
<organization> | ||
<name>Sakai Project</name> | ||
<url>http://sakaiproject.org/</url> | ||
</organization> | ||
<inceptionYear>2013</inceptionYear> | ||
<description>Userauditservice interfaces (API)</description> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<deploy.target>shared</deploy.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.simpleframework</groupId> | ||
<artifactId>simple-xml</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>${basedir}/src/java</directory> | ||
<includes> | ||
<include>**/*.xml</include> | ||
</includes> | ||
<filtering>false</filtering> | ||
</resource> | ||
</resources> | ||
</build> | ||
</project> |
57 changes: 57 additions & 0 deletions
57
...uditservice/api/src/java/org/sakaiproject/userauditservice/api/UserAuditRegistration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/********************************************************************************** | ||
* $URL$ | ||
* $Id$ | ||
*********************************************************************************** | ||
* | ||
* Copyright (c) 2013 The Sakai Foundation | ||
* | ||
* Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.opensource.org/licenses/ECL-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.userauditservice.api; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* <p> | ||
* UserAuditRegistrationService controls calls relating to tracking user auditing. | ||
* </p> | ||
*/ | ||
public interface UserAuditRegistration | ||
{ | ||
/** One character key a tool will use to show where the change came from */ | ||
public String getDatabaseSourceKey(); | ||
|
||
/** The text to register that will be associated with the databaseSourceKey */ | ||
public String getSourceText(String[] parameter); | ||
|
||
/** | ||
* Processes a list of String[] to add records into the database about | ||
* @param userAuditList List of String[] to process | ||
*/ | ||
public void addToUserAuditing(List<String[]> userAuditList); | ||
|
||
/** | ||
* Method to delete all the user auditing log entries for a site. Used when deleting a site | ||
* @param siteId String site id to delete user auditing logs | ||
*/ | ||
public void deleteUserAuditingFromSite(String siteId); | ||
|
||
/** | ||
* This method will allow registering tools to supply their own location for resource loaders | ||
* @param location | ||
* @return | ||
*/ | ||
public Object getResourceLoader(String location); | ||
} |
58 changes: 58 additions & 0 deletions
58
userauditservice/api/src/java/org/sakaiproject/userauditservice/api/UserAuditService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/********************************************************************************** | ||
* $URL$ | ||
* $Id$ | ||
*********************************************************************************** | ||
* | ||
* Copyright (c) 2013 The Sakai Foundation | ||
* | ||
* Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.opensource.org/licenses/ECL-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.userauditservice.api; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Service interface that allows tools to register their own database key and associated text for User Auditing | ||
* | ||
*/ | ||
public interface UserAuditService { | ||
|
||
/** Database action value for logging a user was added to a site */ | ||
static final String USER_AUDIT_ACTION_ADD = "A"; | ||
|
||
/** Database action value for logging a user was removed from a site */ | ||
static final String USER_AUDIT_ACTION_REMOVE = "D"; | ||
|
||
/** Database action value for logging a user was updated in a site, typically in a different role */ | ||
static final String USER_AUDIT_ACTION_UPDATE = "U"; | ||
|
||
/** | ||
* Method to register a UserAuditRegistration object | ||
* @param ua | ||
*/ | ||
public void register(UserAuditRegistration uar); | ||
|
||
/** | ||
* Gets all UserAuditRegistration objects that have been registered | ||
* @return | ||
*/ | ||
public List<UserAuditRegistration> getRegisteredItems(); | ||
|
||
/** | ||
* Get the keys for all UserAuditRegistration objects that have been registered | ||
* @return | ||
*/ | ||
public List<String> getKeys(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.sakaiproject.userauditservice</groupId> | ||
<artifactId>userauditservice</artifactId> | ||
<version>10.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<name>Sakai Userauditservice Deploy POM</name> | ||
<groupId>org.sakaiproject.userauditservice</groupId> | ||
<artifactId>userauditservice-deploy</artifactId> | ||
<version>10.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<description>Userauditservice deploy POM.</description> | ||
|
||
<organization> | ||
<name>Sakai Project</name> | ||
<url>http://sakaiproject.org/</url> | ||
</organization> | ||
<inceptionYear>2013</inceptionYear> | ||
|
||
<modules> | ||
<module>shared</module> | ||
</modules> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.simpleframework</groupId> | ||
<artifactId>simple-xml</artifactId> | ||
<version>${sakai.simple-xml.version}</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.sakaiproject.userauditservice</groupId> | ||
<artifactId>userauditservice-deploy</artifactId> | ||
<version>10.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<name>Sakai userauditservice Shared Deploy</name> | ||
<groupId>org.sakaiproject.userauditservice</groupId> | ||
<artifactId>userauditservice-shared</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<description>userauditservice shared deploy POM.</description> | ||
|
||
<organization> | ||
<name>Sakai Project</name> | ||
<url>http://sakaiproject.org/</url> | ||
</organization> | ||
<inceptionYear>2013</inceptionYear> | ||
|
||
<properties> | ||
<deploy.target>shared</deploy.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.simpleframework</groupId> | ||
<artifactId>simple-xml</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.sakaiproject.userauditservice</groupId> | ||
<artifactId>userauditservice</artifactId> | ||
<version>10.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<name>Sakai Userauditservice Implementation (userauditservice-impl)</name> | ||
<groupId>org.sakaiproject.userauditservice</groupId> | ||
<artifactId>userauditservice-impl</artifactId> | ||
<organization> | ||
<name>Sakai Project</name> | ||
<url>http://sakaiproject.org/</url> | ||
</organization> | ||
<inceptionYear>2013</inceptionYear> | ||
<description>Userauditservice implementation</description> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<deploy.target /> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>userauditservice-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.sakaiproject.kernel</groupId> | ||
<artifactId>sakai-kernel-api</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>${basedir}/src/java</directory> | ||
<includes> | ||
<include>**/*.xml</include> | ||
</includes> | ||
<filtering>false</filtering> | ||
</resource> | ||
<resource> | ||
<directory>${basedir}/src/sql</directory> | ||
<includes> | ||
<include>**/*.sql</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</build> | ||
</project> |
Oops, something went wrong.