irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

objMetaOpr.cpp File Reference
#include <sys/types.h>
#include <sys/wait.h>
#include "objMetaOpr.hpp"
#include "resource.hpp"
#include "collection.hpp"
#include "specColl.hpp"
#include "genQuery.h"
#include "icatHighLevelRoutines.hpp"
#include "miscUtil.h"
#include "modAVUMetadata.h"
#include "rsIcatOpr.hpp"
#include "rsGenQuery.hpp"
#include "rsModAVUMetadata.hpp"
#include "irods_resource_redirect.hpp"
#include "irods_hierarchy_parser.hpp"
#include "boost/lexical_cast.hpp"
Include dependency graph for objMetaOpr.cpp:

Go to the source code of this file.

Functions

int svrCloseQueryOut (rsComm_t *rsComm, genQueryOut_t *genQueryOut)
 
int isData (rsComm_t *rsComm, char *objName, rodsLong_t *dataId)
 
int getPhyPath (rsComm_t *_comm, char *_obj_name, char *_resource, char *_phy_path, char *_resc_hier)
 
int isCollAllKinds (rsComm_t *rsComm, char *objName, rodsLong_t *collId)
 
int isColl (rsComm_t *rsComm, char *objName, rodsLong_t *collId)
 
int isUser (rsComm_t *rsComm, char *objName)
 
int isResc (rsComm_t *rsComm, char *objName)
 
int isMeta (rsComm_t *, char *)
 
int isToken (rsComm_t *, char *)
 
int getObjType (rsComm_t *rsComm, char *objName, char *objType)
 
int addAVUMetadataFromKVPairs (rsComm_t *rsComm, char *objName, char *inObjType, keyValPair_t *kVP)
 
int setAVUMetadataFromKVPairs (rsComm_t *rsComm, char *objName, char *inObjType, keyValPair_t *kVP)
 
int getStructFileType (specColl_t *specColl)
 
int removeAVUMetadataFromKVPairs (rsComm_t *rsComm, char *objName, char *inObjType, keyValPair_t *kVP)
 
rodsLong_t getTokenId (rsComm_t *rsComm, char *tokenNameSpace, char *tokenName)
 
rodsLong_t getUserId (rsComm_t *rsComm, char *userName, char *zoneName)
 
int checkPermitForDataObject (rsComm_t *rsComm, char *objName, int userId, int operId)
 
int checkPermitForCollection (rsComm_t *rsComm, char *objName, int userId, int operId)
 
int checkPermitForResource (rsComm_t *rsComm, char *objName, int userId, int operId)
 
int checkPermissionByObjType (rsComm_t *rsComm, char *objName, char *objType, char *user, char *zone, char *oper)
 
int checkDupReplica (rsComm_t *rsComm, rodsLong_t dataId, char *rescName, char *filePath)
 
int getNumSubfilesInBunfileObj (rsComm_t *rsComm, char *objPath)
 

Function Documentation

◆ addAVUMetadataFromKVPairs()

int addAVUMetadataFromKVPairs ( rsComm_t rsComm,
char *  objName,
char *  inObjType,
keyValPair_t kVP 
)

Definition at line 311 of file objMetaOpr.cpp.

References modAVUMetadataInp_t::arg0, modAVUMetadataInp_t::arg1, modAVUMetadataInp_t::arg2, modAVUMetadataInp_t::arg3, modAVUMetadataInp_t::arg4, modAVUMetadataInp_t::arg5, getObjType(), KeyValPair::keyWord, KeyValPair::len, LOG_ERROR, rodsLog(), rsModAVUMetadata(), irods.pypyodbc::status, SYS_INVALID_INPUT_PARAM, and KeyValPair::value.

Referenced by msiAssociateKeyValuePairsToObj().

Here is the call graph for this function:

◆ checkDupReplica()

int checkDupReplica ( rsComm_t rsComm,
rodsLong_t  dataId,
char *  rescName,
char *  filePath 
)

◆ checkPermissionByObjType()

int checkPermissionByObjType ( rsComm_t rsComm,
char *  objName,
char *  objType,
char *  user,
char *  zone,
char *  oper 
)

◆ checkPermitForCollection()

int checkPermitForCollection ( rsComm_t rsComm,
char *  objName,
int  userId,
int  operId 
)

Definition at line 541 of file objMetaOpr.cpp.

References addInxIval(), addInxVal(), clearGenQueryInp(), COL_COLL_ACCESS_TYPE, COL_COLL_ACCESS_USER_ID, COL_COLL_ID, COL_COLL_NAME, freeGenQueryOut(), MAX_NAME_LEN, GenQueryInp::maxRows, NULL, rsGenQuery(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, and irods.pypyodbc::status.

Referenced by checkPermissionByObjType().

Here is the call graph for this function:

◆ checkPermitForDataObject()

int checkPermitForDataObject ( rsComm_t rsComm,
char *  objName,
int  userId,
int  operId 
)

Definition at line 504 of file objMetaOpr.cpp.

References addInxIval(), addInxVal(), clearGenQueryInp(), COL_COLL_NAME, COL_D_DATA_ID, COL_DATA_ACCESS_TYPE, COL_DATA_ACCESS_USER_ID, COL_DATA_NAME, freeGenQueryOut(), MAX_NAME_LEN, GenQueryInp::maxRows, NULL, rsGenQuery(), GenQueryInp::selectInp, splitPathByKey(), GenQueryInp::sqlCondInp, and irods.pypyodbc::status.

Referenced by checkPermissionByObjType().

Here is the call graph for this function:

◆ checkPermitForResource()

int checkPermitForResource ( rsComm_t rsComm,
char *  objName,
int  userId,
int  operId 
)

Definition at line 571 of file objMetaOpr.cpp.

References addInxIval(), addInxVal(), clearGenQueryInp(), COL_R_RESC_ID, COL_R_RESC_NAME, COL_RESC_ACCESS_TYPE, COL_RESC_ACCESS_USER_ID, freeGenQueryOut(), MAX_NAME_LEN, GenQueryInp::maxRows, NULL, rsGenQuery(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, and irods.pypyodbc::status.

Referenced by checkPermissionByObjType().

Here is the call graph for this function:

◆ getNumSubfilesInBunfileObj()

int getNumSubfilesInBunfileObj ( rsComm_t rsComm,
char *  objPath 
)

◆ getObjType()

int getObjType ( rsComm_t rsComm,
char *  objName,
char *  objType 
)

Definition at line 285 of file objMetaOpr.cpp.

References INVALID_OBJECT_TYPE, isColl(), isData(), isMeta(), isResc(), isToken(), isUser(), and NULL.

Referenced by addAVUMetadataFromKVPairs(), msiApplyDCMetadataTemplate(), msiCheckAccess(), msiGetObjType(), removeAVUMetadataFromKVPairs(), and setAVUMetadataFromKVPairs().

Here is the call graph for this function:

◆ getPhyPath()

int getPhyPath ( rsComm_t _comm,
char *  _obj_name,
char *  _resource,
char *  _phy_path,
char *  _resc_hier 
)

◆ getStructFileType()

◆ getTokenId()

rodsLong_t getTokenId ( rsComm_t rsComm,
char *  tokenNameSpace,
char *  tokenName 
)

Definition at line 435 of file objMetaOpr.cpp.

References addInxIval(), addInxVal(), clearGenQueryInp(), COL_TOKEN_ID, COL_TOKEN_NAME, COL_TOKEN_NAMESPACE, freeGenQueryOut(), getSqlResultByInx(), LOG_ERROR, MAX_NAME_LEN, GenQueryInp::maxRows, NAME_LEN, NULL, rodsLog(), rsGenQuery(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, irods.pypyodbc::status, UNMATCHED_KEY_OR_INDEX, and SqlResult::value.

Referenced by checkPermissionByObjType().

Here is the call graph for this function:

◆ getUserId()

rodsLong_t getUserId ( rsComm_t rsComm,
char *  userName,
char *  zoneName 
)

Definition at line 469 of file objMetaOpr.cpp.

References addInxIval(), addInxVal(), clearGenQueryInp(), COL_USER_ID, COL_USER_NAME, COL_USER_ZONE, freeGenQueryOut(), getSqlResultByInx(), LOG_ERROR, MAX_NAME_LEN, GenQueryInp::maxRows, NAME_LEN, NULL, rodsLog(), rsGenQuery(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, irods.pypyodbc::status, UNMATCHED_KEY_OR_INDEX, and SqlResult::value.

Referenced by checkPermissionByObjType().

Here is the call graph for this function:

◆ isColl()

int isColl ( rsComm_t rsComm,
char *  objName,
rodsLong_t collId 
)

Definition at line 204 of file objMetaOpr.cpp.

References addInxIval(), addInxVal(), clearGenQueryInp(), COL_COLL_ID, COL_COLL_NAME, freeGenQueryOut(), getSqlResultByInx(), LOG_ERROR, MAX_NAME_LEN, GenQueryInp::maxRows, NULL, rodsLog(), rsGenQuery(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, irods.pypyodbc::status, UNMATCHED_KEY_OR_INDEX, and SqlResult::value.

Referenced by _rsDataObjRename(), getObjType(), mountFileDir(), rsCollCreate(), rsGetHostForGet(), and scanObjCol().

Here is the call graph for this function:

◆ isCollAllKinds()

int isCollAllKinds ( rsComm_t rsComm,
char *  objName,
rodsLong_t collId 
)

Definition at line 186 of file objMetaOpr.cpp.

References collStatAllKinds(), rodsObjStat::dataId, freeRodsObjStat(), MAX_NAME_LEN, NULL, DataObjInp::objPath, rstrcpy(), and irods.pypyodbc::status.

Referenced by rsMkCollR().

Here is the call graph for this function:

◆ isData()

int isData ( rsComm_t rsComm,
char *  objName,
rodsLong_t dataId 
)

◆ isMeta()

int isMeta ( rsComm_t ,
char *   
)

Definition at line 273 of file objMetaOpr.cpp.

References INVALID_OBJECT_TYPE.

Referenced by getObjType().

◆ isResc()

int isResc ( rsComm_t rsComm,
char *  objName 
)

Definition at line 255 of file objMetaOpr.cpp.

References addInxIval(), addInxVal(), clearGenQueryInp(), COL_R_RESC_ID, COL_R_RESC_NAME, freeGenQueryOut(), GenQueryInp::maxRows, NAME_LEN, NULL, rsGenQuery(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, and irods.pypyodbc::status.

Referenced by getObjType().

Here is the call graph for this function:

◆ isToken()

int isToken ( rsComm_t ,
char *   
)

Definition at line 279 of file objMetaOpr.cpp.

References INVALID_OBJECT_TYPE.

Referenced by getObjType().

◆ isUser()

int isUser ( rsComm_t rsComm,
char *  objName 
)

Definition at line 237 of file objMetaOpr.cpp.

References addInxIval(), addInxVal(), clearGenQueryInp(), COL_USER_ID, COL_USER_NAME, freeGenQueryOut(), GenQueryInp::maxRows, NAME_LEN, NULL, rsGenQuery(), GenQueryInp::selectInp, GenQueryInp::sqlCondInp, and irods.pypyodbc::status.

Referenced by getObjType().

Here is the call graph for this function:

◆ removeAVUMetadataFromKVPairs()

int removeAVUMetadataFromKVPairs ( rsComm_t rsComm,
char *  objName,
char *  inObjType,
keyValPair_t kVP 
)

Definition at line 400 of file objMetaOpr.cpp.

References modAVUMetadataInp_t::arg0, modAVUMetadataInp_t::arg1, modAVUMetadataInp_t::arg2, modAVUMetadataInp_t::arg3, modAVUMetadataInp_t::arg4, modAVUMetadataInp_t::arg5, getObjType(), KeyValPair::keyWord, KeyValPair::len, NULL, rsModAVUMetadata(), irods.pypyodbc::status, and KeyValPair::value.

Referenced by msiRemoveKeyValuePairsFromObj().

Here is the call graph for this function:

◆ setAVUMetadataFromKVPairs()

int setAVUMetadataFromKVPairs ( rsComm_t rsComm,
char *  objName,
char *  inObjType,
keyValPair_t kVP 
)

Definition at line 351 of file objMetaOpr.cpp.

References modAVUMetadataInp_t::arg0, modAVUMetadataInp_t::arg1, modAVUMetadataInp_t::arg2, modAVUMetadataInp_t::arg3, modAVUMetadataInp_t::arg4, modAVUMetadataInp_t::arg5, getObjType(), KeyValPair::keyWord, KeyValPair::len, NULL, rsModAVUMetadata(), irods.pypyodbc::status, and KeyValPair::value.

Referenced by msiSetKeyValuePairsToObj().

Here is the call graph for this function:

◆ svrCloseQueryOut()

int svrCloseQueryOut ( rsComm_t rsComm,
genQueryOut_t genQueryOut 
)

Definition at line 26 of file objMetaOpr.cpp.

References GenQueryInp::continueInx, GenQueryOut::continueInx, GenQueryInp::maxRows, NULL, rsGenQuery(), and irods.pypyodbc::status.

Referenced by msiSetDataTypeFromExt().

Here is the call graph for this function: