-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing repository issues with returning the protocol for EntityDescriptorProjections
- Loading branch information
Showing
3 changed files
with
67 additions
and
15 deletions.
There are no files selected for viewing
65 changes: 52 additions & 13 deletions
65
...in/java/edu/internet2/tier/shibboleth/admin/ui/repository/EntityDescriptorProjection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,61 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.repository; | ||
|
||
import com.fasterxml.jackson.annotation.JsonGetter; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import edu.internet2.tier.shibboleth.admin.ui.domain.EntityDescriptorProtocol; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public interface EntityDescriptorProjection { | ||
default String getId() { | ||
return getResourceId(); | ||
public class EntityDescriptorProjection { | ||
@Getter | ||
String id; | ||
String entityID; | ||
String entityId; | ||
@Getter | ||
String resourceId; | ||
@Getter | ||
String serviceProviderName; | ||
@Getter | ||
String createdBy; | ||
@Getter | ||
LocalDateTime createdDate; | ||
@Getter | ||
boolean serviceEnabled; | ||
@Getter | ||
String idOfOwner; | ||
EntityDescriptorProtocol protocol; | ||
|
||
public EntityDescriptorProjection(String entityID, String resourceId, String serviceProviderName, String createdBy, | ||
LocalDateTime createdDate, boolean serviceEnabled, String idOfOwner, String protocol) { | ||
this.entityID = entityID; | ||
this.entityId = entityID; | ||
this.resourceId = resourceId; | ||
this.id = resourceId; | ||
this.serviceProviderName = serviceProviderName; | ||
this.createdBy = createdBy; | ||
this.createdDate = createdDate; | ||
this.serviceEnabled = serviceEnabled; | ||
this.idOfOwner = idOfOwner; | ||
setProtocol(protocol); | ||
} | ||
|
||
public String getEntityID() { | ||
return entityID; | ||
} | ||
|
||
public String getEntityId() { | ||
return entityId; | ||
} | ||
|
||
public EntityDescriptorProtocol getProtocol() { | ||
return protocol == null ? EntityDescriptorProtocol.SAML : protocol; | ||
} | ||
String getEntityID(); | ||
default String getEntityId() { | ||
return getEntityID(); | ||
|
||
public void setProtocol(String index) { | ||
int i = Integer.valueOf(index); | ||
protocol = EntityDescriptorProtocol.values()[i]; | ||
} | ||
String getResourceId(); | ||
String getServiceProviderName(); | ||
String getCreatedBy(); | ||
LocalDateTime getCreatedDate(); | ||
boolean getServiceEnabled(); | ||
String getIdOfOwner(); | ||
EntityDescriptorProtocol getProtocol(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters