Coverage Report - org.apache.maven.archiva.repository.audit.AuditEvent
 
Classes in this File Line Coverage Branch Coverage Complexity
AuditEvent
0%
0/27
N/A
1
 
 1  
 package org.apache.maven.archiva.repository.audit;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *  http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 /**
 23  
  * AuditEvent
 24  
  * 
 25  
  * @version $Id: AuditEvent.java 756563 2009-03-20 16:12:10Z brett $
 26  
  */
 27  
 public class AuditEvent
 28  
 {
 29  
     public static final String CREATE_DIR = "Created Directory";
 30  
 
 31  
     public static final String CREATE_FILE = "Created File";
 32  
 
 33  
     public static final String REMOVE_DIR = "Removed Directory";
 34  
 
 35  
     public static final String REMOVE_FILE = "Removed File";
 36  
 
 37  
     public static final String MODIFY_FILE = "Modified File";
 38  
 
 39  
     public static final String MOVE_FILE = "Moved File";
 40  
 
 41  
     public static final String MOVE_DIRECTORY = "Moved Directory";
 42  
 
 43  
     public static final String COPY_DIRECTORY = "Copied Directory";
 44  
 
 45  
     public static final String COPY_FILE = "Copied File";
 46  
 
 47  
     public static final String UPLOAD_FILE = "Uploaded File";
 48  
 
 49  
     public static final String ADD_LEGACY_PATH = "Added Legacy Artifact Path";
 50  
 
 51  
     public static final String REMOVE_LEGACY_PATH = "Removed Legacy Artifact Path";
 52  
 
 53  
     public static final String PURGE_ARTIFACT = "Purged Artifact";
 54  
 
 55  
     public static final String PURGE_FILE = "Purged Support File";
 56  
 
 57  
     public static final String REMOVE_SCANNED = "Removed in Filesystem";
 58  
 
 59  
     // configuration events
 60  
 
 61  
     public static final String ADD_MANAGED_REPO = "Added Managed Repository";
 62  
 
 63  
     public static final String MODIFY_MANAGED_REPO = "Updated Managed Repository";
 64  
 
 65  
     public static final String DELETE_MANAGED_REPO = "Deleted Managed Repository";
 66  
 
 67  
     public static final String ADD_REMOTE_REPO = "Added Remote Repository";
 68  
 
 69  
     public static final String MODIFY_REMOTE_REPO = "Updated Remote Repository";
 70  
 
 71  
     public static final String DELETE_REMOTE_REPO = "Deleted Remote Repository";
 72  
 
 73  
     public static final String ADD_REPO_GROUP = "Added Repository Group";
 74  
 
 75  
     public static final String DELETE_REPO_GROUP = "Deleted Repository Group";
 76  
 
 77  
     public static final String ADD_REPO_TO_GROUP = "Added Repository to Group";
 78  
 
 79  
     public static final String DELETE_REPO_FROM_GROUP = "Deleted Repository from Group";
 80  
 
 81  
     public static final String ENABLE_REPO_CONSUMER = "Enabled Content Consumer";
 82  
 
 83  
     public static final String DISABLE_REPO_CONSUMER = "Disabled Content Consumer";
 84  
 
 85  
     public static final String ENABLE_DB_CONSUMER = "Enabled Database Consumer";
 86  
 
 87  
     public static final String DISABLE_DB_CONSUMER = "Disabled Database Consumer";
 88  
 
 89  
     public static final String ADD_PATTERN = "Added File Type Pattern";
 90  
 
 91  
     public static final String REMOVE_PATTERN = "Removed File Type Pattern";
 92  
 
 93  
     public static final String DB_SCHEDULE = "Modified Scanning Schedule";
 94  
 
 95  
     private String repositoryId;
 96  
 
 97  
     private String userId;
 98  
 
 99  
     private String remoteIP;
 100  
 
 101  
     private String resource;
 102  
 
 103  
     private String action;
 104  
 
 105  
     public AuditEvent()
 106  0
     {
 107  
         /* do nothing */
 108  0
     }
 109  
 
 110  
     public AuditEvent( String repoId, String user, String resource, String action )
 111  0
     {
 112  0
         this.repositoryId = repoId;
 113  0
         this.userId = user;
 114  0
         this.resource = resource;
 115  0
         this.action = action;
 116  0
     }
 117  
 
 118  
     public AuditEvent( String user, String resource, String action )
 119  
     {
 120  0
         this( null, user, resource, action );
 121  0
     }
 122  
 
 123  
     public AuditEvent( String principal, String action2 )
 124  
     {
 125  0
         this( null, principal, action2 );
 126  0
     }
 127  
 
 128  
     public String getRepositoryId()
 129  
     {
 130  0
         return repositoryId;
 131  
     }
 132  
 
 133  
     public void setRepositoryId( String repositoryId )
 134  
     {
 135  0
         this.repositoryId = repositoryId;
 136  0
     }
 137  
 
 138  
     public String getUserId()
 139  
     {
 140  0
         return userId;
 141  
     }
 142  
 
 143  
     public void setUserId( String userId )
 144  
     {
 145  0
         this.userId = userId;
 146  0
     }
 147  
 
 148  
     public String getResource()
 149  
     {
 150  0
         return resource;
 151  
     }
 152  
 
 153  
     public void setResource( String resource )
 154  
     {
 155  0
         this.resource = resource;
 156  0
     }
 157  
 
 158  
     public String getAction()
 159  
     {
 160  0
         return action;
 161  
     }
 162  
 
 163  
     public void setAction( String action )
 164  
     {
 165  0
         this.action = action;
 166  0
     }
 167  
 
 168  
     public String getRemoteIP()
 169  
     {
 170  0
         return remoteIP;
 171  
     }
 172  
 
 173  
     public void setRemoteIP( String remoteIP )
 174  
     {
 175  0
         this.remoteIP = remoteIP;
 176  0
     }
 177  
 }