diff options
| author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-04-18 08:41:11 +0200 | 
|---|---|---|
| committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-04-18 08:41:11 +0200 | 
| commit | e71dc9f4f38fc762dad0ce5e0c0cbb8bd5884685 (patch) | |
| tree | 2d24a12679ca98acfcf36a865a0384b807dc8edd /id/server/moa-id-commons/src | |
| parent | 02769f78b45dfbbaaaa45f067cf49011d7113d9e (diff) | |
| download | moa-id-spss-e71dc9f4f38fc762dad0ce5e0c0cbb8bd5884685.tar.gz moa-id-spss-e71dc9f4f38fc762dad0ce5e0c0cbb8bd5884685.tar.bz2 moa-id-spss-e71dc9f4f38fc762dad0ce5e0c0cbb8bd5884685.zip | |
add new DB for interfederation to AuthenticatedSessionStore
Diffstat (limited to 'id/server/moa-id-commons/src')
2 files changed, 195 insertions, 0 deletions
| diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java index 730a328ab..29cc5ebdc 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java @@ -100,6 +100,9 @@ public class AuthenticatedSessionStore implements Serializable{  	@OneToMany(mappedBy="moasession", cascade=CascadeType.ALL)      private List<OldSSOSessionIDStore> oldssosessionids = null; +	@OneToMany(mappedBy="moasession", cascade=CascadeType.ALL) +    private List<InterfederationSessionStore> inderfederation = null; +      @PrePersist      protected void created() {      this.updated = this.created = new Date(); @@ -193,6 +196,20 @@ public class AuthenticatedSessionStore implements Serializable{  	public void setOldssosessionids(List<OldSSOSessionIDStore> oldssosessionids) {  		this.oldssosessionids = oldssosessionids;  	} +	 +	/** +	 * @return the inderfederation +	 */ +	public List<InterfederationSessionStore> getInderfederation() { +		return inderfederation; +	} + +	/** +	 * @param inderfederation the inderfederation to set +	 */ +	public void setInderfederation(List<InterfederationSessionStore> inderfederation) { +		this.inderfederation = inderfederation; +	}  	/**  	 * @return the pendingRequestID diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/InterfederationSessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/InterfederationSessionStore.java new file mode 100644 index 000000000..93734954f --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/InterfederationSessionStore.java @@ -0,0 +1,178 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +package at.gv.egovernment.moa.id.commons.db.dao.session; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import org.hibernate.annotations.DynamicUpdate; + +@Entity +@DynamicUpdate(value=true) +@Table(name = "interfederation") + +public class InterfederationSessionStore implements Serializable{ + +	private static final long serialVersionUID = 1L; +	 +	@Id +	@GeneratedValue(strategy = GenerationType.IDENTITY) +	@Column(name = "id", unique=true, nullable=false) +	private long id; +		 +	@Column(name = "idpurlprefix", unique=false, nullable=false) +	private String idpurlprefix; +	 +	@Column(name = "sessionIndex", unique=false, nullable=false) +	private String sessionIndex; +	 +	@Column(name = "nameID", unique=false, nullable=false) +	private String userNameID; +	 +	@Column(name = "attributesRequested", unique=false, nullable=true) +	private boolean attributesRequested; +	 +	@Column(name = "created", updatable=false, nullable=false) +//    @Temporal(TemporalType.TIMESTAMP) +    private Date created; +	 +//    @PrePersist +//    protected void created() { +//    	this.created = new Date(); +//    } + +	@ManyToOne(fetch=FetchType.LAZY) +	@JoinColumn(name = "moasession") +	private AuthenticatedSessionStore moasession; + +	/** +	 * @return the id +	 */ +	public long getId() { +		return id; +	} + +	/** +	 * @param id the id to set +	 */ +	public void setId(long id) { +		this.id = id; +	} + +	/** +	 * @return the idpurlprefix +	 */ +	public String getIdpurlprefix() { +		return idpurlprefix; +	} + +	/** +	 * @param idpurlprefix the idpurlprefix to set +	 */ +	public void setIdpurlprefix(String idpurlprefix) { +		this.idpurlprefix = idpurlprefix; +	} + +	/** +	 * @return the sessionIndex +	 */ +	public String getSessionIndex() { +		return sessionIndex; +	} + +	/** +	 * @param sessionIndex the sessionIndex to set +	 */ +	public void setSessionIndex(String sessionIndex) { +		this.sessionIndex = sessionIndex; +	} + +	/** +	 * @return the userNameID +	 */ +	public String getUserNameID() { +		return userNameID; +	} + +	/** +	 * @param userNameID the userNameID to set +	 */ +	public void setUserNameID(String userNameID) { +		this.userNameID = userNameID; +	} + +	/** +	 * @return the attributesRequested +	 */ +	public boolean isAttributesRequested() { +		return attributesRequested; +	} + +	/** +	 * @param attributesRequested the attributesRequested to set +	 */ +	public void setAttributesRequested(boolean attributesRequested) { +		this.attributesRequested = attributesRequested; +	} + +	/** +	 * @return the created +	 */ +	public Date getCreated() { +		return created; +	} + +	/** +	 * @param created the created to set +	 */ +	public void setCreated(Date created) { +		this.created = created; +	} + +	/** +	 * @return the moasession +	 */ +	public AuthenticatedSessionStore getMoasession() { +		return moasession; +	} + +	/** +	 * @param moasession the moasession to set +	 */ +	public void setMoasession(AuthenticatedSessionStore moasession) { +		this.moasession = moasession; +	} + + +} + | 
