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.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  }