2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.usermanager.internal;
11 import org.opendaylight.controller.sal.utils.Status;
14 * Configuration Java Object which represents a Local configured Authorization
15 * for a remote authenticated user for User Manager.
17 public class AuthorizationConfig extends UserConfig {
18 private static final long serialVersionUID = 1L;
20 public AuthorizationConfig() {
24 // Constructor may be needed for autocontainer logic
25 public AuthorizationConfig(String user, String role) {
32 public Status validate() {
33 return (!isRoleValid().isSuccess() ? isRoleValid() : isUsernameValid());
36 public String getRolesData() {
37 return (role.replace(",", " "));
40 public String toString() {
41 return "AuthorizationConfig=[user: " + user + ", role: " + role + "]";