295 * @return the actions (always returns "read").
296 */
297 public String getActions() {
298 return "read";
299 }
300
301 /**
302 * Return a homogeneous collection of PrivateCredentialPermissions
303 * in a {@code PermissionCollection}.
304 * No such {@code PermissionCollection} is defined,
305 * so this method always returns {@code null}.
306 *
307 * @return null in all cases.
308 */
309 public PermissionCollection newPermissionCollection() {
310 return null;
311 }
312
313 private void init(String name) {
314
315 if (name == null || name.trim().length() == 0) {
316 throw new IllegalArgumentException("invalid empty name");
317 }
318
319 ArrayList<CredOwner> pList = new ArrayList<>();
320 StringTokenizer tokenizer = new StringTokenizer(name, " ", true);
321 String principalClass = null;
322 String principalName = null;
323
324 if (testing)
325 System.out.println("whole name = " + name);
326
327 // get the Credential Class
328 credentialClass = tokenizer.nextToken();
329 if (testing)
330 System.out.println("Credential Class = " + credentialClass);
331
332 if (tokenizer.hasMoreTokens() == false) {
333 MessageFormat form = new MessageFormat(ResourcesMgr.getString
334 ("permission.name.name.syntax.invalid."));
335 Object[] source = {name};
|
295 * @return the actions (always returns "read").
296 */
297 public String getActions() {
298 return "read";
299 }
300
301 /**
302 * Return a homogeneous collection of PrivateCredentialPermissions
303 * in a {@code PermissionCollection}.
304 * No such {@code PermissionCollection} is defined,
305 * so this method always returns {@code null}.
306 *
307 * @return null in all cases.
308 */
309 public PermissionCollection newPermissionCollection() {
310 return null;
311 }
312
313 private void init(String name) {
314
315 if (name == null || name.trim().isEmpty()) {
316 throw new IllegalArgumentException("invalid empty name");
317 }
318
319 ArrayList<CredOwner> pList = new ArrayList<>();
320 StringTokenizer tokenizer = new StringTokenizer(name, " ", true);
321 String principalClass = null;
322 String principalName = null;
323
324 if (testing)
325 System.out.println("whole name = " + name);
326
327 // get the Credential Class
328 credentialClass = tokenizer.nextToken();
329 if (testing)
330 System.out.println("Credential Class = " + credentialClass);
331
332 if (tokenizer.hasMoreTokens() == false) {
333 MessageFormat form = new MessageFormat(ResourcesMgr.getString
334 ("permission.name.name.syntax.invalid."));
335 Object[] source = {name};
|