added link operation manage
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/content-management/storage-manager-trigger@93487 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d8f0b32fc5
commit
3bd6b11c1e
|
@ -63,6 +63,9 @@ public class JsonParser extends Thread{
|
|||
String lastUser=null;
|
||||
// logger.info("obj.get(lastUser) "+obj.get("lastUser"));
|
||||
if(obj.get("lastUser") != null) lastUser=(String)obj.get("lastUser");
|
||||
int linkCount=0;
|
||||
// logger.info("obj.get(lastUser) "+obj.get("lastUser"));
|
||||
if(obj.get("linkCount") != null) linkCount=(int)obj.get("linkCount");
|
||||
// logger.info("last USER field: "+lastUser);
|
||||
String delete=null;
|
||||
// logger.info("obj.get(OnDeleting) "+obj.get("onDeleting"));
|
||||
|
@ -73,25 +76,27 @@ public class JsonParser extends Thread{
|
|||
long length=-1;
|
||||
if(obj.get("length")!=null) length=(long)obj.get("length");
|
||||
logger.info("[recordCheck] operation: "+op+" name: "+name+" type: "+type+" path: "+filename+" length: "+length+" owner: "+owner+"\n\t cretionTime: "+creationTime+ " id: "+id+" lastOperation "+lastOperation+" lastUser: "+lastUser+" lastAccess: "+lastAccess);
|
||||
if(((length >0) && (filename!=null))){
|
||||
if(((length >0) && ((filename!=null) || (linkCount > 0)))){
|
||||
//call to the accounting library
|
||||
String scope=retrieveScopeFromRemoteFilePath(filename);
|
||||
String operation=null;
|
||||
String scope=null;
|
||||
if(filename!=null)
|
||||
scope=retrieveScopeFromRemoteFilePath(filename);
|
||||
else{
|
||||
String pathString=(String)obj.get("onScope");
|
||||
scope=retrieveScopeFromRemoteFilePath(pathString);
|
||||
}
|
||||
if(delete!=null){
|
||||
operation="DELETE";
|
||||
}else{
|
||||
operation=lastOperation;
|
||||
lastOperation="DELETE";
|
||||
}
|
||||
// operation=mappingOperationField(op, id, delete, lastAccess);
|
||||
// report(op, filename, owner, creationTime, delete, id, length,scope, operation);
|
||||
logger.info(" operation accounted "+operation);
|
||||
logger.info("\n[accountingCall] operation: "+operation+"\n\t name: "+name+"\n\t type: "+type+"\n\t path: "+filename+"\n\t length: "+length+"\n\t owner: "+owner+"\n\t cretionTime: "+creationTime+"\n\t id: "+id+"\n\t scope: "+scope+"\n\t lastOperation "+lastOperation+"\n\t lastUser: "+lastUser+"\n\t lastAccess: "+lastAccess);
|
||||
logger.info(" operation accounted "+lastOperation);
|
||||
logger.info("\n[accountingCall] operation: "+lastOperation+"\n\t name: "+name+"\n\t type: "+type+"\n\t path: "+filename+"\n\t length: "+length+"\n\t owner: "+owner+"\n\t cretionTime: "+creationTime+"\n\t id: "+id+"\n\t scope: "+scope+"\n\t lastOperation "+lastOperation+"\n\t lastUser: "+lastUser+"\n\t lastAccess: "+lastAccess);
|
||||
// }else if(op.equals("i")){
|
||||
// previousInsert=id;
|
||||
}else{
|
||||
logger.info("operation is not accounted");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue