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.msrpc;
16  
17  import jcifs.dcerpc.ndr.NdrBuffer;
18  import jcifs.dcerpc.ndr.NdrObject;
19  
20  /**
21   * <a href="GroupMembership.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Marcellus Tavares
24   */
25  public class GroupMembership extends NdrObject {
26  
27      public GroupMembership() {
28      }
29  
30      public GroupMembership(int relativeId, int attributes) {
31          _relativeId = relativeId;
32          _attributes = attributes;
33      }
34  
35      public void decode(NdrBuffer ndrBuffer) {
36          ndrBuffer.align(4);
37  
38          _relativeId = ndrBuffer.dec_ndr_long();
39          _attributes = ndrBuffer.dec_ndr_long();
40      }
41  
42      public void encode(NdrBuffer ndrBuffer) {
43          ndrBuffer.align(4);
44  
45          ndrBuffer.enc_ndr_long(_relativeId);
46          ndrBuffer.enc_ndr_long(_attributes);
47      }
48  
49      public int getAttributes() {
50          return _attributes;
51      }
52  
53      public int getRelativeId() {
54          return _relativeId;
55      }
56  
57      private int _attributes;
58      private int _relativeId;
59  
60  }