if (strValue == null || strValue.length() == 0) return 0;
// parse access mode according to convention
String accessString = strValue.trim().toUpperCase();
short ta = 0;
int idx = -1;
TExportProperty txp = rHndlr.getExportProperty();
if (txp == null) return TErrorList.code_failure;
if ((idx=accessString.indexOf("XREAD")) >= 0)
{ // remove this from the accessString for further comparisons
txp.hasExclusiveRead = true;
String s = accessString.substring(0, idx);
s += accessString.substring(idx+5, accessString.length());
accessString = s;
}
if (accessString.indexOf("WRITE") >= 0) ta |= TAccess.CA_WRITE;
if (accessString.indexOf("READ") >= 0) ta |= TAccess.CA_READ;
if (accessString.indexOf("NETWORK") >= 0) ta |= TAccess.CA_READ|TAccess.CA_NETWORK;
if (accessString.indexOf("ASYNC") >= 0)
{
ta &= ~(TAccess.CA_WRITE);
ta |= TAccess.CA_READ|TAccess.CA_NOSYNC;
}
if (accessString.indexOf("SAVERESTORE") >= 0) ta |= TAccess.CA_SAVERESTORE;
if (accessString.indexOf("HIST") >= 0) ta |= TAccess.CA_HIST;
if (accessString.indexOf("FORCEOUTPUT") >= 0) ta |= TAccess.CA_FORCEOUTPUT;
txp.setAccessMode(ta);
if (txp.hasExclusiveRead && !TAccess.isRead((byte)ta))
{ // force read calls thru the security layer for this property !
txp.hasUnlockedExclusiveRead = true;
}
return 0;