use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.
the class ActivityValidatorTest method validateEmploymentWithoutOrg.
@Test(expected = InvalidOrgException.class)
public void validateEmploymentWithoutOrg() {
Employment e = getEmployment();
e.setOrganization(null);
activityValidator.validateAffiliation(e, null, false, true, Visibility.PUBLIC);
}
use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.
the class ActivityValidatorTest method getEmployment.
public Employment getEmployment() {
Employment employment = new Employment();
employment.setDepartmentName("department name");
employment.setEndDate(getFuzzyDate());
employment.setOrganization(getOrganization());
employment.setRoleTitle("role");
employment.setStartDate(getFuzzyDate());
employment.setVisibility(Visibility.PUBLIC);
return employment;
}
use of org.orcid.jaxb.model.v3.dev1.record.Employment in project ORCID-Source by ORCID.
the class MemberV3ApiServiceDelegatorImpl method viewEmployment.
@Override
public Response viewEmployment(String orcid, Long putCode) {
Employment e = affiliationsManagerReadOnly.getEmploymentAffiliation(orcid, putCode);
orcidSecurityManager.checkAndFilter(orcid, e, ScopePathType.AFFILIATIONS_READ_LIMITED);
ActivityUtils.setPathToActivity(e, orcid);
sourceUtils.setSourceName(e);
return Response.ok(e).build();
}
Aggregations