AnsweredAssumed Answered

Auditoria método Delete

Question asked by ingcarloshud on Dec 1, 2008
Latest reply on Dec 17, 2008 by pjcaracuel_2349
Un saludo para todos.
Mi actual problema radica en que cuando habilito la auditoria para ver los movimientos que se hacen en los espacios y contenidos, al eliminar alguno de estos (contnido o subespacio) la plantilla me muestra en la columna Method el siguiente valor "processTemplate" en lugar de mostrar "Delete".  A continuación adjunto el código del archivo auditConfig.xml y de la plantilla show_audit.ftl respectivamente:

auditConfig.xml
<?xml version='1.0' encoding='UTF-8'?>

<!– Default Audit Configuration –>

<Audit xmlns="http://www.alfresco.org/model/audit/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" enabled="true" auditInternal="false" mode="all">
   
    <!–                –>
    <!– Global options –>
    <!–                –>
   
    <!– Do not record any additional information –>
   
    <RecordOptions>
        <recordPath>false</recordPath>
        <recordFilters>false</recordFilters>
        <recordSerializedReturnValue>false</recordSerializedReturnValue>
        <recordSerializedExceptions>false</recordSerializedExceptions>
        <recordSerializedMethodArguments>false</recordSerializedMethodArguments>
        <recordSerializedKeyPropertiesBeforeInvocation>false</recordSerializedKeyPropertiesBeforeInvocation>
        <recordSerializedKeyPropertiesAferInvocation>false</recordSerializedKeyPropertiesAferInvocation>
    </RecordOptions>
   
    <!–                          –>
    <!– Specific service options –>
    <!–                          –>
   
    <Service name="ServiceRegistry" mode="none" enabled="false"/>
   
    <!– The action service –>
   
    <Service name="ActionService" mode="none">
        <Method name="executeAction" mode="all" auditInternal="true"/>
        <Method name="saveAction" mode="all"/>
        <Method name="removeAction" mode="all"/>
        <Method name="removeAllActions" mode="all"/>
    </Service>
   
    <!– The COCI Service –>
   
    <Service name="CheckoutCheckinService">
        <Method name="getWorkingCopy" mode="none"/>
    </Service>
   
    <!– The DictionaryService –>
    <!– There are no audtiable methods in the data dictionary service –>
    <Service name="DictionaryService" mode="none" enabled="false"/>
   
    <!– The Lock Service –>
   
    <Service name="LockService">
        <Method name="getLockStatus" mode="none"/>
        <Method name="getLockType" mode="none"/>
        <Method name="getLocks" mode="none"/>
    </Service>
   
    <!– The File/Folder Service –>
   
    <Service name="FileFolderService" mode="none">
        <Method name="rename" mode="all"/>
        <Method name="move" mode="all"/>
        <Method name="copy" mode="all" auditInternal="true"/>
        <Method name="create" mode="all"/>
        <Method name="delete" mode="all"/>
        <Method name="makeFolders" mode="all"/>
        <Method name="getWriter" mode="all"/>
      <Method name="getReader" mode="all"/>
    </Service>
   
    <Service name="ContentService" mode="none">
        <Method name="getWriter" mode="all"/>
        <Method name="transform" mode="all"/>
      <Method name="getReader" mode="all"/>
    </Service>
   
    <Service name="CopyService" mode="none">
        <Method name="copy" mode="all" auditInternal="true"/>
    </Service>
   
    <!– The MimetypeService –>
    <!– There are no audtiable methods in the mime type service –>
    <Service name="MimetypeService" mode="none" enabled="false"/>
   
<!– The ContentFilterLanguagesService –>
    <Service name="ContentFilterLanguagesService" mode="none" >
        <Method name="getFilterLanguages" mode="all"/>
        <Method name="getMissingLanguages" mode="all"/>
        <Method name="getDefaultLanguage" mode="all"/>
    </Service>
    <Service name="NodeService" mode="none">
        <Method name="createStore" mode="all"/>
        <Method name="createNode" mode="all"/>
        <Method name="moveNode" mode="all"/>
        <Method name="setChildAssociationIndex" mode="all"/>
        <Method name="setType" mode="all"/>
        <Method name="addAspect" mode="all"/>
        <Method name="removeAspect" mode="all"/>
        <Method name="deleteNode" mode="all"/>
        <Method name="addChild" mode="all"/>
        <Method name="removeChild" mode="all"/>
        <Method name="setProperties" mode="all"/>
        <Method name="setProperty" mode="all"/>
        <Method name="createAssociation" mode="all"/>
        <Method name="removeAssociation" mode="all"/>
        <Method name="restoreNode" mode="all"/>
    </Service>
   
    <Service name="ScriptService" auditInternal="true"/>
   
    <Service name="TemplateService" auditInternal="true">
        <Method name="getTemplateProcessor" mode="none"/>
    </Service>
   
    <Service name="RuleService" mode="none" auditInternal="true">
        <Method name="disableRules" mode="all"/>
        <Method name="enableRules" mode="all"/>
        <Method name="disableRule" mode="all"/>
        <Method name="enableRule" mode="all"/>
        <Method name="createRule" mode="all"/>
        <Method name="saveRule" mode="all"/>
        <Method name="removeRule" mode="all"/>
        <Method name="removeAllRules" mode="all"/>
    </Service>
   
    <Service name="CategoryService" mode="none">
        <Method name="createClassifiction" mode="all"/>
        <Method name="createRootCategory" mode="all"/>
        <Method name="createCategory" mode="all"/>
        <Method name="deleteClassification" mode="all"/>
        <Method name="deleteCategory" mode="all"/>
    </Service>
   
    <Service name="SearchService" mode="none" enabled="false"/>
   
    <Service name="AuthenticationService" mode="none">
        <Method name="createAuthentication" mode="all"/>
        <Method name="updateAuthentication" mode="all"/>
        <Method name="setAuthentication" mode="all"/>
        <Method name="deleteAuthentication" mode="all"/>
        <Method name="setAuthenticationEnabled" mode="all"/>
        <Method name="authenticate" mode="all"/>
        <Method name="authenticateAsGuest" mode="all"/>
        <Method name="authenticationExists" mode="all"/>
        <Method name="invalidateUserSession" mode="all"/>
        <Method name="invalidateTicket" mode="all"/>
        <Method name="validate" mode="all"/>
        <Method name="clearCurrentSecurityContext" mode="all"/>
    </Service>
   
    <Service name="AuthorityService" mode="none">
        <Method name="createAuthority" mode="all"/>
        <Method name="addAuthority" mode="all"/>
        <Method name="removeAuthority" mode="all"/>
        <Method name="deleteAuthority" mode="all"/>
    </Service>
   
    <Service name="OwnableService" mode="none">
        <Method name="setOwner" mode="all"/>
        <Method name="takeOwnership" mode="all"/>
    </Service>
   
    <Service name="PermissionService" mode="none">
        <Method name="deletePermissions" mode="all"/>
        <Method name="clearPermission" mode="all"/>
        <Method name="deletePermission" mode="all"/>
        <Method name="setPermission" mode="all"/>
        <Method name="setInheritParentPermissions" mode="all"/>
    </Service>
   
    <Service name="PersonService" mode="none">
        <Method name="setCreateMissingPeople" mode="all"/>
        <Method name="setPersonProperties" mode="all"/>
        <Method name="createPerson" mode="all"/>
        <Method name="deletePerson" mode="all"/>
    </Service>
   
    <Service name="VersionService" mode="none">
        <Method name="createVersion" mode="all"/>
        <Method name="revert" mode="all"/>
        <Method name="restore" mode="all"/>
        <Method name="deleteVersionHistory" mode="all"/>
    </Service>
   
    <Service name="ExporterService"/>
   
    <Service name="ImporterService"/>
   
    <Service name="RepositoryExporterService"/>
   
    <Service name="DescriptorService" mode="none" enabled="false"/>
   
    <Service name="LicenseService" mode="none" enabled="false"/>
   
    <Service name="NamespaceService" mode="none" enabled="false"/>
   
    <Service name="TransactionService" mode="none" enabled="false"/>
   
    <Service name="WorkflowService" auditInternal="true">
        <Method name="isDefinitionDeployed" mode="none"/>
        <Method name="getDefinitions" mode="none"/>
        <Method name="getDefinitionById" mode="none"/>
        <Method name="getDefinitionByName" mode="none"/>
        <Method name="getActiveWorkflows" mode="none"/>
        <Method name="getWorkflowPaths" mode="none"/>
        <Method name="getTasksForWorkflowPath" mode="none"/>
        <Method name="getTaskById" mode="none"/>
        <Method name="getAssignedTasks" mode="none"/>
        <Method name="getPooledTasks" mode="none"/>
    </Service>
   
</Audit>

show_audit.ftl
 <#– Shows some general audit info about the current document –>
<#if document?exists>
   <h4>Current Docuement Audit Info</h4>
   <b>Name:</b> ${document.name}<br>
   <table border="1" cellspacing="0" cellpadding="4">
   <tr>
          <th>User Name</th>
          <th>Application</th>
          <th>Service</th>
          <th>Method</th>
          <th>Timestamp</th>
          <th>Failed</th>
          <th>Message</th>
          <th>Arg 1</th>
          <th>Arg 2</th>
          <th>Arg 3</th>
          <th>Arg 4</th>
          <th>Arg 5</th>
          <th>Return</th>
          <th>Thowable</th>
          <th>TX</th>
   </tr>
   <#list document.auditTrail as t>
           <tr>
          <td>${t.userIdentifier}</td>
          <td>${t.auditApplication}</td>
          <#if t.auditService?exists>
             <td>${t.auditService}</td>
          <#else>
             <td> </td>
          </#if>
          <#if t.auditMethod?exists>
             <td>${t.auditMethod}</td>
          <#else>
             <td> </td>
          </#if>
          <td>${t.date}</td>
          <#if t.fail?exists>
             <td>${t.fail?string("FAILED", "OK")}</td>
          <#else>
             <td> </td>
          </#if>      
          <#if t.message?exists>
             <td>${t.message}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[0]?exists>
             <td>${t.methodArgumentsAsStrings[0]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[1]?exists>
             <td>${t.methodArgumentsAsStrings[1]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[2]?exists>
             <td>${t.methodArgumentsAsStrings[2]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[3]?exists>
             <td>${t.methodArgumentsAsStrings[3]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[4]?exists>
             <td>${t.methodArgumentsAsStrings[4]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.returnObjectAsString?exists>
             <td>${t.returnObjectAsString}</td>
          <#else>
             <td> </td>
          </#if>
          <#if t.throwableAsString?exists>
             <td>${t.throwableAsString}</td>
          <#else>
             <td> </td>
          </#if>         
          <td>${t.txId}</td>
      </tr>
   </#list>
   </table>
<#elseif space?exists>
   <h4>Current Space Audit Info:</h4>
   <b>Name:</b> ${space.name}<br>
   <table border="1" cellspacing="0" cellpadding="4">
   <tr>
          <th>User Name</th>
          <th>Application</th>
          <th>Service</th>
          <th>Method</th>
          <th>Timestamp</th>
          <th>Failed</th>
          <th>Message</th>
          <th>Arg 1</th>
          <th>Arg 2</th>
          <th>Arg 3</th>
          <th>Arg 4</th>
          <th>Arg 5</th>
          <th>Return</th>
          <th>Thowable</th>
          <th>TX</th>
   </tr>

   <#list space.auditTrail as t>
           <tr>
          <td>${t.userIdentifier}</td>
          <td>${t.auditApplication}</td>
          <#if t.auditService?exists>
             <td>${t.auditService}</td>
          <#else>
             <td> </td>
          </#if>
          <#if t.auditMethod?exists>
             <td>${t.auditMethod}</td>
          <#else>
             <td> </td>
          </#if>
          <td>${t.date}</td>
          <#if t.fail?exists>
             <td>${t.fail?string("FAILED", "OK")}</td>
          <#else>
             <td> </td>
          </#if>      
          <#if t.message?exists>
             <td>${t.message}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[0]?exists>
             <td>${t.methodArgumentsAsStrings[0]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[1]?exists>
             <td>${t.methodArgumentsAsStrings[1]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[2]?exists>
             <td>${t.methodArgumentsAsStrings[2]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[3]?exists>
             <td>${t.methodArgumentsAsStrings[3]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.methodArgumentsAsStrings[4]?exists>
             <td>${t.methodArgumentsAsStrings[4]}</td>
          <#else>
             <td> </td>
          </#if>         
          <#if t.returnObjectAsString?exists>
             <td>${t.returnObjectAsString}</td>
          <#else>
             <td> </td>
          </#if>
          <#if t.throwableAsString?exists>
             <td>${t.throwableAsString}</td>
          <#else>
             <td> </td>
          </#if>         
          <td>${t.txId}</td>
      </tr>
   </#list>
   </table>
</#if>
Les agradezco su ayuda!!!
PD. La versión de Alfresco que utilizo es la Community 2.1 sobre el servidor de aplicaciones tomcat y sobre Mysql.

Outcomes