1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.security.ntlm;
16  
17  import com.liferay.portal.kernel.util.CharPool;
18  import com.liferay.portal.kernel.util.StringPool;
19  
20  /**
21   * <a href="NtlmServiceAccount.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Marcellus Tavares
24   */
25  public class NtlmServiceAccount {
26  
27      public NtlmServiceAccount(String account, String password) {
28          setAccount(account);
29          setPassword(password);
30      }
31  
32      public String getAccount() {
33          return _account;
34      }
35  
36      public String getAccountName() {
37          return _accountName;
38      }
39  
40      public String getComputerName() {
41          return _computerName;
42      }
43  
44      public String getPassword() {
45          return _password;
46      }
47  
48      public void setAccount(String account) {
49          _account = account;
50  
51          _accountName = _account.substring(0, _account.indexOf(CharPool.AT));
52          _computerName = _account.substring(
53              0, _account.indexOf(StringPool.DOLLAR));
54      }
55  
56      public void setPassword(String password) {
57          _password = password;
58      }
59  
60      private String _account;
61      private String _accountName;
62      private String _computerName;
63      private String _password;
64  
65  }