private static String getIdUniqueNumber(String policyId) {
String[] idTokens = policyId.split("_");
if (idTokens.length == 0) {
throw new UnsupportedPolicyException("Unrecognized policyId: " + policyId);
}
if (idTokens.length == 1) {
return idTokens[0];
}
if (idTokens.length == 2) {
if ((VISIBILITY_PRIVATE_PREFIX.equals(idTokens[0])) || (VISIBILITY_PUBLIC_PREFIX.equals(idTokens[0]))) {
return idTokens[1];
}
}
throw new UnsupportedPolicyException("Unrecognized policyId: " + policyId);
}