Search in sources :

Example 1 with TEnumToString

use of org.eclipse.sw360.datahandler.TEnumToString in project sw360portal by sw360.

the class WhenComputePermissions method the_highest_allowed_action_is_computed_for_user_$_with_user_group_$_and_department_$.

public WhenComputePermissions the_highest_allowed_action_is_computed_for_user_$_with_user_group_$_and_department_$(@Quoted String userEmail, @TEnumToString UserGroup userGroup, @Quoted String userDept) {
    final User user = new User(DUMMY_ID, userEmail, userDept).setUserGroup(userGroup);
    final DocumentPermissions<Project> projectDocumentPermissions = PermissionUtils.makePermission(project, user);
    allowedActions = projectDocumentPermissions.getAllAllowedActions();
    return self();
}
Also used : Project(org.eclipse.sw360.datahandler.thrift.projects.Project) User(org.eclipse.sw360.datahandler.thrift.users.User)

Example 2 with TEnumToString

use of org.eclipse.sw360.datahandler.TEnumToString in project sw360portal by sw360.

the class WhenComputeVisibility method the_visibility_is_computed_for_department_$_and_user_group_$.

public WhenComputeVisibility the_visibility_is_computed_for_department_$_and_user_group_$(@Quoted String department, @TEnumToString UserGroup userGroup) {
    final User user = new User(DUMMY_ID, DUMMY_MAIL, department).setUserGroup(userGroup);
    isVisible = ProjectPermissions.isVisible(user).test(project);
    return self();
}
Also used : User(org.eclipse.sw360.datahandler.thrift.users.User)

Example 3 with TEnumToString

use of org.eclipse.sw360.datahandler.TEnumToString in project sw360portal by sw360.

the class WhenComputeClearingState method the_release_clearing_state_is_set_to.

public WhenComputeClearingState the_release_clearing_state_is_set_to(@TEnumToString ClearingState clearingState) {
    Release release = getFirstRelease();
    Mockito.when(release.getClearingState()).thenReturn(clearingState);
    the_clearing_state_is_computed_for(lastTestedClearingTeam);
    return self();
}
Also used : Release(org.eclipse.sw360.datahandler.thrift.components.Release)

Example 4 with TEnumToString

use of org.eclipse.sw360.datahandler.TEnumToString in project sw360portal by sw360.

the class WhenComputeClearingState method team_$_sets_fossology_status_to.

public WhenComputeClearingState team_$_sets_fossology_status_to(@Quoted String clearingTeam, @TEnumToString FossologyStatus fossologyStatus) {
    Release release = getFirstRelease();
    Map<String, FossologyStatus> clearingTeamToFossologyStatus = release.getClearingTeamToFossologyStatus();
    clearingTeamToFossologyStatus.put(clearingTeam, fossologyStatus);
    the_clearing_state_is_computed_for(lastTestedClearingTeam);
    return self();
}
Also used : TEnumToString(org.eclipse.sw360.datahandler.TEnumToString) FossologyStatus(org.eclipse.sw360.datahandler.thrift.components.FossologyStatus) Release(org.eclipse.sw360.datahandler.thrift.components.Release)

Aggregations

Release (org.eclipse.sw360.datahandler.thrift.components.Release)2 User (org.eclipse.sw360.datahandler.thrift.users.User)2 TEnumToString (org.eclipse.sw360.datahandler.TEnumToString)1 FossologyStatus (org.eclipse.sw360.datahandler.thrift.components.FossologyStatus)1 Project (org.eclipse.sw360.datahandler.thrift.projects.Project)1