use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class WorkspaceController method getKeywordsFormJson.
@RequestMapping(value = "/my-orcid/keywordsForms.json", method = RequestMethod.GET)
@ResponseBody
public KeywordsForm getKeywordsFormJson(HttpServletRequest request) throws NoSuchRequestHandlingMethodException {
Keywords keywords = profileKeywordManager.getKeywords(getCurrentUserOrcid());
KeywordsForm form = KeywordsForm.valueOf(keywords);
// Set the default visibility
ProfileEntity profile = profileEntityCacheManager.retrieve(getCurrentUserOrcid());
if (profile != null && profile.getActivitiesVisibilityDefault() != null) {
form.setVisibility(Visibility.valueOf(profile.getActivitiesVisibilityDefault()));
}
return form;
}
use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class MapperFacadeFactory method getAddressMapperFacade.
public MapperFacade getAddressMapperFacade() {
MapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();
ClassMapBuilder<Address, AddressEntity> addressClassMap = mapperFactory.classMap(Address.class, AddressEntity.class);
addV3DateFields(addressClassMap);
registerSourceConverters(mapperFactory, addressClassMap);
addressClassMap.field("putCode", "id");
addressClassMap.field("country.value", "iso2Country");
addressClassMap.field("visibility", "visibility");
addressClassMap.fieldBToA("displayIndex", "displayIndex");
addressClassMap.byDefault();
addressClassMap.register();
return mapperFactory.getMapperFacade();
}
use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method createQualificationSummary.
protected QualificationSummary createQualificationSummary(Visibility v, String sourceId) {
QualificationSummary e = new QualificationSummary();
e.setVisibility(v);
setSource(e, sourceId);
return e;
}
use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method createWorkSummary.
protected WorkSummary createWorkSummary(Visibility v, String sourceId, String extIdValue) {
WorkSummary work = new WorkSummary();
work.setVisibility(v);
ExternalID extId = new ExternalID();
extId.setValue(extIdValue);
ExternalIDs extIds = new ExternalIDs();
extIds.getExternalIdentifier().add(extId);
work.setExternalIdentifiers(extIds);
addSharedExtId(extIds);
setSource(work, sourceId);
return work;
}
use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method createEmploymentSummary.
protected EmploymentSummary createEmploymentSummary(Visibility v, String sourceId) {
EmploymentSummary e = new EmploymentSummary();
e.setVisibility(v);
setSource(e, sourceId);
return e;
}
Aggregations