use of org.apereo.portal.io.xml.SimpleStringPortalData in project uPortal by Jasig.
the class FragmentLayoutsDataFunction method apply.
@Override
public Iterable<? extends IPortalData> apply(IPortalDataType input) {
final List<FragmentDefinition> fragments = this.configurationLoader.getFragments();
final List<IPortalData> portalData = Lists.transform(fragments, new Function<FragmentDefinition, IPortalData>() {
@Override
public IPortalData apply(FragmentDefinition fragmentDefinition) {
return new SimpleStringPortalData(fragmentDefinition.getOwnerId(), fragmentDefinition.getName(), fragmentDefinition.getDescription());
}
});
return portalData;
}
use of org.apereo.portal.io.xml.SimpleStringPortalData in project uPortal by Jasig.
the class FragmentDefinitionDataFunction method apply.
@Override
public Iterable<? extends IPortalData> apply(IPortalDataType input) {
final List<FragmentDefinition> fragmentDefinitions = this.fragmentDefinitionDao.getAllFragments();
final List<IPortalData> portalData = Lists.transform(fragmentDefinitions, new Function<FragmentDefinition, IPortalData>() {
@Override
public IPortalData apply(FragmentDefinition fragmentDefinition) {
return new SimpleStringPortalData(fragmentDefinition.getName(), null, fragmentDefinition.getDescription());
}
});
return portalData;
}
use of org.apereo.portal.io.xml.SimpleStringPortalData in project uPortal by Jasig.
the class LayoutsDataFunction method apply.
@Override
public Iterable<? extends IPortalData> apply(IPortalDataType input) {
final List<FragmentDefinition> fragments = this.configurationLoader.getFragments();
final Set<String> fragmentOwners = new LinkedHashSet<String>();
for (final FragmentDefinition fragmentDefinition : fragments) {
fragmentOwners.add(fragmentDefinition.getOwnerId());
}
final List<String> userList = this.jdbcOperations.queryForList("SELECT USER_NAME FROM UP_USER WHERE USER_NAME NOT IN (:userNames)", Collections.singletonMap("userNames", fragmentOwners), String.class);
return Lists.transform(userList, new Function<String, IPortalData>() {
@Override
public IPortalData apply(final String userName) {
return new SimpleStringPortalData(userName, null, null);
}
});
}
use of org.apereo.portal.io.xml.SimpleStringPortalData in project uPortal by Jasig.
the class PersonAttributesGroupStoreDataFunction method apply.
@Override
public Iterable<? extends IPortalData> apply(IPortalDataType input) {
final Set<IPersonAttributesGroupDefinition> personAttributesGroupDefinitions = this.personAttributesGroupDefinitionDao.getPersonAttributesGroupDefinitions();
List<IPersonAttributesGroupDefinition> pagsDefs = new ArrayList<IPersonAttributesGroupDefinition>();
for (IPersonAttributesGroupDefinition pagsDef : personAttributesGroupDefinitions) {
pagsDefs.add(pagsDef);
}
final List<IPortalData> portalData = Lists.transform(pagsDefs, new Function<IPersonAttributesGroupDefinition, IPortalData>() {
@Override
public IPortalData apply(IPersonAttributesGroupDefinition personAttributesGroup) {
return new SimpleStringPortalData(personAttributesGroup.getName(), null, personAttributesGroup.getDescription());
}
});
return portalData;
}
Aggregations