summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satserver/util/LdapMapping.java
blob: f734a1dc83bf7837eb9ef6600758a6ee61e5e2ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package org.openslx.satserver.util;

import com.google.gson.annotations.Expose;

public class LdapMapping
{
	@Expose
	public String uid; // AD: sAMAccountName
	@Expose
	public String homemount; // AD: homeDirectory
	@Expose
	public String localhome; // AD: none, LDAP: homeDirectory
	@Expose
	public String posixAccount; // AD: user
	@Expose
	public String shadowAccount; // AD: user
	@Expose
	public String uidnumber; // AD: objectSid

	@Override
	public String toString()
	{
		StringBuilder sb = new StringBuilder();
		if ( !Util.isEmpty( uid ) ) {
			sb.append( "map.uid=" + uid + "\n" );
		}
		if ( !Util.isEmpty( homemount ) ) {
			sb.append( "map.homemount=" + homemount + "\n" );
		}
		if ( !Util.isEmpty( localhome ) ) {
			sb.append( "map.localhome=" + localhome + "\n" );
		}
		if ( !Util.isEmpty( posixAccount ) ) {
			sb.append( "map.posixAccount=" + posixAccount + "\n" );
		}
		if ( !Util.isEmpty( shadowAccount ) ) {
			sb.append( "map.shadowAccount=" + shadowAccount + "\n" );
		}
		if ( !Util.isEmpty( uidnumber ) ) {
			sb.append( "map.uidnumber=" + uidnumber + "\n" );
		}
		return sb.toString();
	}
}