/*
 * oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2017, Gluu
 */
package org.xdi.config.oxtrust;

import org.gluu.site.ldap.persistence.annotation.LdapAttribute;
import org.gluu.site.ldap.persistence.annotation.LdapEntry;
import org.gluu.site.ldap.persistence.annotation.LdapJsonObject;
import org.gluu.site.ldap.persistence.annotation.LdapObjectClass;

/**
 * Shibboleth IDP CAS-related settings configuration entry. 
 * 
 * @author Dmitry Ognyannikov
 */
@LdapEntry
@LdapObjectClass(values = {"top", "oxShibbolethCASProtocolConfiguration"})
public class LdapShibbolethCASProtocolConfiguration {

    private static final long serialVersionUID = -11887457695212971L;
    
    @LdapJsonObject
    @LdapAttribute(name = "oxConfApplication")
    private ShibbolethCASProtocolConfiguration casProtocolConfiguration;

    @LdapAttribute(name = "oxRevision")
    private long revision;
    
    public LdapShibbolethCASProtocolConfiguration() {}

    /**
     * @return the casProtocolConfiguration
     */
    public ShibbolethCASProtocolConfiguration getCasProtocolConfiguration() {
        return casProtocolConfiguration;
    }

    /**
     * @param casProtocolConfiguration the casProtocolConfiguration to set
     */
    public void setCasProtocolConfiguration(ShibbolethCASProtocolConfiguration casProtocolConfiguration) {
        this.casProtocolConfiguration = casProtocolConfiguration;
    }

    /**
     * @return the revision
     */
    public long getRevision() {
        return revision;
    }

    /**
     * @param revision the revision to set
     */
    public void setRevision(long revision) {
        this.revision = revision;
    }
    
}

@@ -171,16 +171,45 @@
 trust;%0A%0A
+import java.io.Serializable;%0A
 import o
@@ -454,16 +454,49 @@
 ctClass;
+%0Aimport org.xdi.ldap.model.Entry;
 %0A%0A/**%0A *
@@ -730,16 +730,54 @@
 uration 
+extends Entry implements Serializable 
 %7B%0A%0A    p
@@ -840,16 +840,88 @@
 212971L;
+%0A%0A    @LdapAttribute(ignoreDuringUpdate = true)%0A    private String inum;
 %0A    %0A  
@@ -1187,16 +1187,146 @@
 n() %7B%7D%0A%0A
+    public String getInum() %7B%0A        return inum;%0A    %7D%0A%0A    public void setInum(String inum) %7B%0A        this.inum = inum;%0A    %7D%0A%0A
     /**%0A

Add IDP v3 CAS protocol configuration GUI #377 - config saving