01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2002-2004 French National Institute For Research In Computer
04: * Science And Control (INRIA).
05: * Copyright (C) 2005 AmicoSoft, Inc. dba Emic Networks
06: * Contact: sequoia@continuent.org
07: *
08: * Licensed under the Apache License, Version 2.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: * Initial developer(s): Emmanuel Cecchet.
21: * Contributor(s): Mathieu Peltier.
22: */package org.continuent.sequoia.common.users;
23:
24: import org.continuent.sequoia.common.xml.DatabasesXmlTags;
25:
26: /**
27: * A <code>VirtualDatabaseUser</code> is a login/password combination to
28: * represent a virtual database user.
29: *
30: * @author <a href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet</a>
31: * @author <a href="mailto:Mathieu.Peltier@inrialpes.fr">Mathieu Peltier</a>
32: * @version 1.0
33: */
34: public class VirtualDatabaseUser extends AbstractDatabaseUser {
35: private static final long serialVersionUID = 535330556687836840L;
36:
37: /**
38: * Creates a new <code>VirtualDatabaseUser</code> instance. The caller must
39: * ensure that the parameters are not <code>null</code>.
40: *
41: * @param login the user name.
42: * @param password the password.
43: */
44: public VirtualDatabaseUser(String login, String password) {
45: super (login, password);
46: }
47:
48: /**
49: * @see org.continuent.sequoia.common.xml.XmlComponent#getXml()
50: */
51: public String getXml() {
52: return "<" + DatabasesXmlTags.ELT_VirtualLogin + " "
53: + DatabasesXmlTags.ATT_vLogin + "=\"" + getLogin()
54: + "\" " + DatabasesXmlTags.ATT_vPassword + "=\""
55: + getPassword() + "\"/>";
56: }
57: }
|