Skip to content

Commit

Permalink
Cover oxTrust API by tests GluuFederation#786
Browse files Browse the repository at this point in the history
  • Loading branch information
dmogn authored and madumlao committed Apr 5, 2018
1 parent 99fff44 commit 8df1a98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Expand Up @@ -6,6 +6,7 @@

package org.gluu.oxtrust.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
import java.io.Serializable;
Expand All @@ -17,6 +18,7 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import org.gluu.persist.model.base.GluuBoolean;
import org.xdi.model.GluuAttribute;
Expand Down Expand Up @@ -152,6 +154,8 @@ public void setBooleanValues(GluuBoolean[] booleanValues) {
this.booleanValues = booleanValues;
}

@JsonIgnore
@XmlTransient
public void setValues(String[] values) {
this.values = values;
}
Expand All @@ -162,6 +166,8 @@ public void setValues(Collection<String> values) {
}

// To avoid extra code in CR interceptor script
@JsonIgnore
@XmlTransient
public void setValues(Set<String> values) {
this.values = values.toArray(new String[0]);
}
Expand Down
Expand Up @@ -6,6 +6,7 @@

package org.gluu.oxtrust.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
Expand All @@ -30,6 +31,9 @@
import org.gluu.site.ldap.persistence.annotation.LdapObjectClass;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
import javax.xml.bind.annotation.XmlTransient;

@LdapEntry
@LdapObjectClass(values = { "top", "gluuSAMLconfig" })
Expand Down Expand Up @@ -164,14 +168,18 @@ public boolean equals(Object o) {
public List<String> getGluuEntityId() {
return gluuEntityId;
}


@JsonIgnore
@XmlTransient
public void setGluuEntityId(Set<String> gluuEntityId) {
this.gluuEntityId = new ArrayList<String>(gluuEntityId);
}

/*
* This method is for ldap persistance only. For purposes of crud - please use setGluuEntityId(Set<String> gluuEntityId)
* This method is for ldap persistance only. For purposes of crud - plea00se use setGluuEntityId(Set<String> gluuEntityId)
*/
@Deprecated
@JsonSetter(nulls = Nulls.AS_EMPTY)
public void setGluuEntityId(List<String> gluuEntityId) {
this.gluuEntityId = gluuEntityId;
}
Expand Down

0 comments on commit 8df1a98

Please sign in to comment.