1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.security.ntlm;
16  
17  import com.liferay.portal.kernel.util.StringPool;
18  
19  /**
20   * <a href="NtlmServiceAccount.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Marcellus Tavares
23   */
24  public class NtlmServiceAccount {
25  
26      public NtlmServiceAccount(String account, String password) {
27          setAccount(account);
28          setPassword(password);
29      }
30  
31      public String getAccount() {
32          return _account;
33      }
34  
35      public String getAccountName() {
36          return _accountName;
37      }
38  
39      public String getComputerName() {
40          return _computerName;
41      }
42  
43      public String getPassword() {
44          return _password;
45      }
46  
47      public void setAccount(String account) {
48          _account = account;
49  
50          _accountName = _account.substring(0, _account.indexOf(StringPool.AT));
51          _computerName = _account.substring(
52              0, _account.indexOf(StringPool.DOLLAR));
53      }
54  
55      public void setPassword(String password) {
56          _password = password;
57      }
58  
59      private String _account;
60      private String _accountName;
61      private String _computerName;
62      private String _password;
63  
64  }