Skip to content
This repository has been archived by the owner on Apr 29, 2018. It is now read-only.

Commit

Permalink
be more compatible with the underlaying model
Browse files Browse the repository at this point in the history
  • Loading branch information
phaus committed Jan 30, 2017
1 parent 08d0f8c commit 08dc22e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class LdapKeys {
public static final String GROUP_OBJECTCLASS = "groupOfNames";
public static final String JPEG_PHOTO = "jpegPhoto";
public static final String LDAP_ATTRIBUTES_BINARY = "java.naming.ldap.attributes.binary";
public static final String MODIFIERS_NAME = "modifiersName";
public static final String MODIFIERS_NAME = "modifiersName";
public static final String MODIFY_TIMESTAMP = "modifyTimestamp";
public static final String OBJECT_CLASS = "objectClass";
public static final String OWNER = "owner";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public class LdapNode implements Node {
protected Set<String> objectClasses;
protected String name;
protected String dn;
protected String modifyTimestamp;
protected String modifiersName;
protected String entryUUID;
protected String cn;

/**
Expand Down Expand Up @@ -123,15 +120,15 @@ public String getCn() {
}

public boolean isNew() {
return (this.modifiersName == null && this.modifyTimestamp == null);
return (getModifiersName() == null && getModifyTimestamp() == null);
}

public void debug() {
StringBuilder sb = new StringBuilder("\n");
sb.append(LINE);
sb.append("\t").append("dn").append(" : ").append(getDn()).append("\n");
if (!isNew()) {
sb.append("\tupdated: ").append(this.modifyTimestamp).append(" by ").append(this.modifiersName).append("\n");
sb.append("\tupdated: ").append(getModifyTimestamp()).append(" by ").append(getModifiersName()).append("\n");
}
sb.append(LINE);
for (String key : getKeys()) {
Expand Down Expand Up @@ -197,27 +194,27 @@ public void setDn(final String dn) {
}

public void setModifyTimestamp(final String modifyTimestamp) {
this.modifyTimestamp = modifyTimestamp.trim();
set(LdapKeys.MODIFY_TIMESTAMP, modifyTimestamp);
}

public void setModifiersName(final String modifiersName) {
this.modifiersName = modifiersName.trim();
set(LdapKeys.MODIFIERS_NAME, modifiersName);
}

public String getEntryUUID() {
return entryUUID;
return get(LdapKeys.ENTRY_UUID);
}

public void setEntryUUID(String entryUUID) {
this.entryUUID = entryUUID;
set(LdapKeys.ENTRY_UUID, entryUUID);
}

public String getModifiersName() {
return this.modifiersName;
return get(LdapKeys.MODIFIERS_NAME);
}

public String getModifyTimestamp() {
return this.modifyTimestamp;
return get(LdapKeys.MODIFY_TIMESTAMP);
}

public String toLdif(LdapHelper instance) {
Expand Down

0 comments on commit 08dc22e

Please sign in to comment.