Skip to content

Commit

Permalink
[NOISSUE]
Browse files Browse the repository at this point in the history
added coverage
fix `equals` generation
fix typo
fix clear
  • Loading branch information
jj committed Feb 27, 2019
1 parent 1f3ddeb commit cb9d2d1
Show file tree
Hide file tree
Showing 5 changed files with 573 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package edu.internet2.tier.shibboleth.admin.ui.domain;

import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;
import org.opensaml.core.xml.XMLObject;
Expand All @@ -16,6 +17,7 @@


@MappedSuperclass
@EqualsAndHashCode(callSuper = true)
public abstract class AbstractDescriptor extends AbstractAttributeExtensibleXMLObject implements CacheableSAMLObject, TimeBoundSAMLObject, SignableXMLObject {
private Long cacheDuration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package edu.internet2.tier.shibboleth.admin.ui.domain;

import lombok.EqualsAndHashCode;
import org.opensaml.core.xml.ElementExtensibleXMLObject;
import org.opensaml.core.xml.XMLObject;

Expand All @@ -18,6 +19,7 @@

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@EqualsAndHashCode(callSuper = true)
public abstract class AbstractElementExtensibleXMLObject extends AbstractXMLObject implements ElementExtensibleXMLObject {
@OneToMany(cascade = CascadeType.ALL)
@OrderColumn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public List<Logo> getLogos() {
return this.xmlObjects.stream().filter(p -> p instanceof Logo).map(p -> (Logo) p).collect(Collectors.toList());
}

public void addLog(edu.internet2.tier.shibboleth.admin.ui.domain.Logo logo) {
public void addLogo(edu.internet2.tier.shibboleth.admin.ui.domain.Logo logo) {
this.xmlObjects.add(logo);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.SecurityInfoRepresentation;
import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.ServiceProviderSsoDescriptorRepresentation;
import edu.internet2.tier.shibboleth.admin.ui.opensaml.OpenSamlObjects;
import edu.internet2.tier.shibboleth.admin.ui.security.model.User;
import edu.internet2.tier.shibboleth.admin.ui.security.service.UserService;
import edu.internet2.tier.shibboleth.admin.util.MDDCConstants;
import edu.internet2.tier.shibboleth.admin.util.ModelRepresentationConversions;
Expand Down Expand Up @@ -199,6 +198,8 @@ void setupSecurity(EntityDescriptor ed, EntityDescriptorRepresentation represent
void setupUIInfo(EntityDescriptor ed, EntityDescriptorRepresentation representation) {
// set up mdui
if (representation.getMdui() != null) {
// TODO: check if we need more than a naive implementation
removeUIInfo(ed);
MduiRepresentation mduiRepresentation = representation.getMdui();

if (!Strings.isNullOrEmpty(mduiRepresentation.getDisplayName())) {
Expand Down Expand Up @@ -251,7 +252,7 @@ void setupUIInfo(EntityDescriptor ed, EntityDescriptorRepresentation representat

if (!Strings.isNullOrEmpty(mduiRepresentation.getLogoUrl())) {
Logo logo = openSamlObjects.buildDefaultInstanceOfType(Logo.class);
getUIInfo(ed).addLog(logo);
getUIInfo(ed).addLogo(logo);
logo.setURL(mduiRepresentation.getLogoUrl());
logo.setHeight(mduiRepresentation.getLogoHeight());
logo.setWidth(mduiRepresentation.getLogoWidth());
Expand Down
Loading

0 comments on commit cb9d2d1

Please sign in to comment.