-
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.
- Loading branch information
Showing
5 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
...edu/internet2/tier/shibboleth/admin/ui/configuration/EntitiesVersioningConfiguration.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.configuration; | ||
|
||
import edu.internet2.tier.shibboleth.admin.ui.service.EntityDescriptorService; | ||
import edu.internet2.tier.shibboleth.admin.ui.service.EntityDescriptorVersionService; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class EntitiesVersioningConfiguration { | ||
|
||
//@Bean | ||
EntityDescriptorVersionService entityDescriptorVersionService(EntityDescriptorService entityDescriptorService) { | ||
//TODO create real impl when available | ||
return null; | ||
} | ||
} |
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
36 changes: 36 additions & 0 deletions
36
...tier/shibboleth/admin/ui/configuration/TestEntityDescriptorVersioningConfiguration.groovy
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package edu.internet2.tier.shibboleth.admin.ui.configuration | ||
|
||
import edu.internet2.tier.shibboleth.admin.ui.domain.frontend.EntityDescriptorRepresentation | ||
import edu.internet2.tier.shibboleth.admin.ui.domain.versioning.Version | ||
import edu.internet2.tier.shibboleth.admin.ui.service.EntityDescriptorService | ||
import edu.internet2.tier.shibboleth.admin.ui.service.EntityDescriptorVersionService | ||
import edu.internet2.tier.shibboleth.admin.ui.util.TestObjectGenerator | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
import java.time.LocalDateTime | ||
|
||
@Configuration | ||
class TestEntityDescriptorVersioningConfiguration { | ||
|
||
@Autowired | ||
EntityDescriptorService entityDescriptorService | ||
|
||
@Bean | ||
EntityDescriptorVersionService stubEntityDescriptorVersionService() { | ||
return new EntityDescriptorVersionService() { | ||
@Override | ||
List<Version> findVersionsForEntityDescriptor(String resourceId) { | ||
return [new Version(id: '1', creator: 'kramer', date: LocalDateTime.now().minusDays(3)), | ||
new Version(id: '2', creator: 'newman', date: LocalDateTime.now())] | ||
} | ||
|
||
@Override | ||
EntityDescriptorRepresentation findSpecificVersionOfEntityDescriptor(String resourceId, String versionId) { | ||
return entityDescriptorService.createRepresentationFromDescriptor(new TestObjectGenerator().buildEntityDescriptor()) | ||
} | ||
} | ||
} | ||
|
||
} |
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