<< Click to Display Table of Contents >>
CheckIn
Check in item(s).
Prototype
bool CheckIn(string ItemLocalFullPath, string ItemServerFullPath, [bool KeepCheckout], string Comment)
bool CheckIn(array ItemLocalFullPaths, array ItemServerFullPaths, array ErrorCodes, [array KeepCheckouts], string Comment)
bool CheckIn(object Item, string ItemServerFullPath, [bool KeepCheckout], string Comment)
bool CheckIn(array Items, array ItemServerFullPaths, array ErrorCodes, [array KeepCheckouts], string Comment}
Parameters
ItemLocalFullPath |
full path of the local file |
ItemServerFullPath |
full path of repository server |
KeepCheckout |
keepcheckout value |
Comment |
comment |
ItemLocalFullPaths |
array of full path of the local files |
ItemServerFullPaths |
array of full path of repository server items |
ErrorCodes |
array of error code values |
KeepCheckouts |
array of keepcheckout values |
Item |
OZBinary object for downloaded item |
Items |
array of OZBinary object for downloaded items |
Reference
Return true on success, false on failure.
Error item's index gets the error code and the error code is 0 on success.
Example 1
function checkIn(){
var rep = OZCreator.GetBuiltInObject(OZBuiltInObject.REPOSITORY);
var login = rep.Login("admin","admin");
if (login) {
var itemLocalFullPath = "c:/parameter_test.odi";
var itemServerFullPath = "/abc/parameter_test.odi";
var result = rep.CheckIn(itemLocalFullPath, itemServerFullPath, "comment");
if (result == true) {
_DEBUG("result="+result);
} else {
_DEBUG("result="+result+"["+rep.GetLastErrorCode()+"] "+rep.GetErrorMessageByCode(rep.GetLastErrorCode()));
}
rep.Logout();
}
}
Example 2
function checkIn(){
var rep = OZCreator.GetBuiltInObject(OZBuiltInObject.REPOSITORY);
var login = rep.Login("admin","admin");
if (login) {
var itemlocalFullPaths = new Array();
itemlocalFullPaths[0] = "c:/parameter_test.odi";
itemlocalFullPaths[1] = "c:/parameter_test.ozr";
var serverFullPaths = new Array();
serverFullPaths[0] = "/abc/parameter_test.odi";
serverFullPaths[1] = "/abc/parameter_test.ozr";
var errorCodes = new Array();
var keepCheckouts = new Array();
keepCheckouts[0] = true;
keepCheckouts[1] = true;
var result = rep.CheckIn(itemlocalFullPaths, serverFullPaths, errorCodes, keepCheckouts, "comment");
if (result == true) {
_DEBUG("result="+result);
} else {
for (i=0; i < errorCodes.length; i++) {
_DEBUG("i="+i+" ["+errorCodes[i]+"] "+rep.GetErrorMessageByCode(errorCodes[i]));
}
}
rep.Logout();
}
}
Example 3
function checkIn(){
var rep = OZCreator.GetBuiltInObject(OZBuiltInObject.REPOSITORY);
var login = rep.Login("admin","admin");
if (login) {
var item = OZCreator.GetBuiltInObject(OZBuiltInObject.BINARY);
item.ReadFromFile("c:/parameter_test.odi");
var itemServerFullPath = "/abc/parameter_test.odi";
var keepCheckout = true;
var result = rep.CheckIn(item, itemServerFullPath, keepCheckout, "comment");
if (result == true) {
_DEBUG("result="+result);
} else {
_DEBUG("result="+result+"["+rep.GetLastErrorCode()+"] "+rep.GetErrorMessageByCode(rep.GetLastErrorCode()));
}
rep.Logout();
}
}
Example 4
function checkIn(){
var rep = OZCreator.GetBuiltInObject(OZBuiltInObject.REPOSITORY);
var login = rep.Login("admin","admin");
if (login) {
var items = new Array();
items[0] = OZCreator.GetBuiltInObject(OZBuiltInObject.BINARY);
items[0].ReadFromFile("c:/parameter_test.odi");
items[1] = OZCreator.GetBuiltInObject(OZBuiltInObject.BINARY);
items[1].ReadFromFile("c:/parameter_test.ozr");
var itemServerFullPaths = new Array();
itemServerFullPaths[0] = "/data/parameter_test.odi";
itemServerFullPaths[1] = "/report/parameter_test.ozr";
var errorCodes = new Array();
var keepCheckout = new Array();
keepCheckout[0] = true;
keepCheckout[1] = true;
var result = rep.CheckIn(items, itemServerFullPaths, errorCodes, keepCheckout, "comment");
if (result == true) {
_DEBUG("result="+result);
} else {
for (i=0; i < errorCodes.length; i++) {
_DEBUG("i="+i+" ["+errorCodes[i]+"] "+rep.GetErrorMessageByCode(errorCodes[i]));
}
}
rep.Logout();
}
}
See Also