Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Mar 9, 2020
2 parents 4614a5b + dbc04d9 commit 54ecf66
Show file tree
Hide file tree
Showing 52 changed files with 564 additions and 865 deletions.
Expand Up @@ -62,7 +62,7 @@ protected IColumn<SelectableBean<O>, String> createCheckboxColumn() {
protected void onUpdateRow(AjaxRequestTarget target, DataTable table, IModel<SelectableBean<O>> rowModel, IModel<Boolean> selected) {
super.onUpdateRow(target, table, rowModel, selected);
onUpdateCheckbox(target, rowModel);
};
}

@Override
protected void onUpdateHeader(AjaxRequestTarget target, boolean selected, DataTable table) {
Expand Down
Expand Up @@ -84,7 +84,7 @@ private ItemStatus getStatus(I childItem) {
public IW createWrapper(Item childItem, ItemStatus status, WrapperContext context) throws SchemaException {
return createWrapper(null, (I) childItem, status, context);

};
}

private IW createWrapper(PrismContainerValueWrapper<?> parent, I childItem, ItemStatus status, WrapperContext context) throws SchemaException {
IW itemWrapper = createWrapper(parent, childItem, status);
Expand Down
Expand Up @@ -76,7 +76,7 @@ public boolean isCreateIfEmpty() {

public void setCreateIfEmpty(boolean createIfEmpty) {
this.createIfEmpty = createIfEmpty;
};
}

public Boolean getReadOnly() {
return readOnly;
Expand Down
Expand Up @@ -98,7 +98,7 @@ protected void populateItem(ListItem<ContainersPopupDto> item) {

protected boolean getLabelVisible() {
return false;
};
}

};
checkFormGroup.getCheck().add(new EmptyOnChangeAjaxFormUpdatingBehavior());
Expand Down
Expand Up @@ -490,7 +490,7 @@ public boolean isEnabled(){
body.add(allowTransitive);

addAjaxOnUpdateBehavior(body);
};
}

private void addPrivilegesPanel(WebMarkupContainer body){
privilegesNames = getPrivilegesNamesList();
Expand Down
Expand Up @@ -141,7 +141,7 @@ private int computeRefreshInterval() {

public int getAutoRefreshInterval() {
return 0;
};
}

public boolean isAutoRefreshEnabled() {
return false;
Expand Down
Expand Up @@ -116,7 +116,7 @@ public boolean isSecondEnabled(IModel<T> model){
}

public void firstClicked(AjaxRequestTarget target, IModel<T> model){}
public void secondClicked(AjaxRequestTarget target, IModel<T> model){};
public void secondClicked(AjaxRequestTarget target, IModel<T> model){}

public String getFirstSizeCssClass(){
return ButtonSizeClass.SMALL.toString();
Expand Down
Expand Up @@ -53,15 +53,15 @@ public void close(AjaxRequestTarget target) {
protected void onAfterRender() {
opResult.setAlreadyShown(true);
super.onAfterRender();
};
}
};
panel.add(new VisibleEnableBehaviour() {

private static final long serialVersionUID = 1L;

public boolean isVisible() {
return !opResult.isAlreadyShown();
};
}
});

panel.setOutputMarkupId(true);
Expand Down
Expand Up @@ -92,7 +92,7 @@ public String getExcludeOid() {

public IModel<String> getLabel() {
return createStringResource("FocusType.delegations");
};
}

@Override
protected List<InlineMenuItem> createAssignmentMenu() {
Expand Down
Expand Up @@ -80,7 +80,7 @@ public void onClick(AjaxRequestTarget target) {
public void yesPerformed(AjaxRequestTarget target) {
getPageBase().getCounterManager().removeCounter(counter);
target.add(InternalsCountersPanel.this);
};
}
};
getPageBase().showMainPopup(confirmPanel, target);
target.add(InternalsCountersPanel.this);
Expand Down
Expand Up @@ -63,7 +63,7 @@ protected void onError(AjaxRequestTarget target) {
}
};
form.add(update);
};
}

private void updateDebugPerformed(AjaxRequestTarget target){
getModelObject().saveDebugUtil();
Expand Down
Expand Up @@ -83,7 +83,7 @@ protected void onError(AjaxRequestTarget target) {
}
};
form.add(update);
};
}

private void updateTraces(AjaxRequestTarget target){
for (Entry<String, Boolean> entry: tracesMap.entrySet()) {
Expand Down
Expand Up @@ -29,7 +29,7 @@ public class PasswordQuestionsDto implements Serializable{
}*/
public PasswordQuestionsDto(){

};
}

public PasswordQuestionsDto(String passwQuestion, String passAnswer){
this.passwQuestion = passwQuestion;
Expand Down
Expand Up @@ -227,7 +227,7 @@ protected void runConfirmPerformed(AjaxRequestTarget target, ReportType reportTy
PageReports.this.runConfirmPerformed(target, reportType, reportParam);
hideMainPopup(target);

};
}
};
showMainPopup(runReportPopupPanel, target);

Expand Down
Expand Up @@ -525,7 +525,7 @@ private List<TaskType> getTasksForKind(List<PrismObject<TaskType>> tasks) {

protected void initCustomLayout() {
// Nothing to do, for subclass extension
};
}

protected ObjectQuery createQuery() {
ObjectQuery baseQuery = null;
Expand Down
Expand Up @@ -855,7 +855,7 @@ protected String getNullValidDisplayValue(){

protected void onUpdate(AjaxRequestTarget target) {
refreshAll(target);
};
}

});

Expand Down
Expand Up @@ -203,7 +203,7 @@ private void initLayout(){

public boolean isVisible() {
return (level != null && level.getFormRef() != null && level.getFormRef().getOid() != null);
};
}
});

if (level != null && level.getFormRef() != null && level.getFormRef().getOid() != null) {
Expand Down
Expand Up @@ -144,7 +144,7 @@ public boolean isVisible() {

public boolean isVisible() {
return getResetPasswordPolicy().getResetMethod() == ResetMethod.SECURITY_QUESTIONS;
};
}
});

WebMarkupContainer emailContainer = new WebMarkupContainer(ID_EMAIL_CONTAINER);
Expand All @@ -161,7 +161,7 @@ public boolean isVisible() {
public boolean isVisible() {
ResetMethod resetMethod = getResetPasswordPolicy().getResetMethod();
return resetMethod == ResetMethod.SECURITY_QUESTIONS || resetMethod == ResetMethod.MAIL;
};
}
});

}
Expand Down
Expand Up @@ -112,7 +112,7 @@ public boolean isVisible() {

public boolean isVisible() {
return oldPasswordVisible;
};
}
});

PasswordPanel passwordPanel = new PasswordPanel(ID_PASSWORD_PANEL, new PropertyModel<>(model, MyPasswordsDto.F_PASSWORD));
Expand Down
Expand Up @@ -99,7 +99,7 @@ protected void initLayout() {

public IModel<?> getBody() {
return searchTypes.get(selectedSearchType);
};
}

@Override
protected void onSubmit(AjaxRequestTarget target) {
Expand Down
Expand Up @@ -102,7 +102,7 @@ protected AuthenticationProvider getProvider(AbstractCredentialAuthenticationMod
}

return getObjectObjectPostProcessor().postProcess(createProvider(usedPolicy));
};
}

protected abstract ModuleAuthentication createEmptyModuleAuthentication(AbstractAuthenticationModuleType moduleType, C configuration);

Expand Down
Expand Up @@ -123,7 +123,7 @@ protected AuthenticationProvider getProvider(AuthenticationModuleLdapType module
getObjectObjectPostProcessor().postProcess(provider);

return provider;
};
}

protected ModuleWebSecurityConfig createModule(ModuleWebSecurityConfiguration configuration) {
return getObjectObjectPostProcessor().postProcess(new LdapWebSecurityConfig((LdapModuleWebSecurityConfiguration) configuration));
Expand Down
Expand Up @@ -17,7 +17,7 @@ public class LegacyValidationMessage {

public enum Type {
WARNING, ERROR
};
}

public Type type;
public String oid;
Expand Down
Expand Up @@ -36,7 +36,7 @@ public interface LocalDefinitionStore {
@SuppressWarnings("unchecked")
default <ID extends ItemDefinition> ID findLocalItemDefinition(@NotNull QName name) {
return (ID) findLocalItemDefinition(name, ItemDefinition.class, false);
};
}

@SuppressWarnings("unchecked")
default <ID extends ItemDefinition> ID findItemDefinition(@NotNull ItemPath path) {
Expand Down
Expand Up @@ -700,12 +700,13 @@ public void test700Exists() throws Exception {
checkQueryRoundtripFile(AccessCertificationCaseType.class, q);
}

public static final String TEST_900_910_FILE_NAME = TEST_DIR + "/test900TypeWrong.xml";

@Test
public void test900TypeWrong() throws Exception {
final String TEST_NAME = "test900TypeWrong";
String fileName = TEST_DIR + "/" + TEST_NAME + ".xml";
try {
toQueryType(FileUtils.readFileToString(new File(fileName), StandardCharsets.UTF_8));
toQueryType(FileUtils.readFileToString(
new File(TEST_900_910_FILE_NAME), StandardCharsets.UTF_8));
fail("Unexpected success!");
} catch (SchemaException e) {
System.out.println("Got expected exception: " + e.getMessage());
Expand All @@ -714,10 +715,8 @@ public void test900TypeWrong() throws Exception {

@Test
public void test910TypeWrongCompat() throws Exception {
final String TEST_NAME = "test900TypeWrong";
String fileName = TEST_DIR + "/" + TEST_NAME + ".xml";
QueryType jaxb = toQueryTypeCompat(
FileUtils.readFileToString(new File(fileName), StandardCharsets.UTF_8));
QueryType jaxb = toQueryTypeCompat(FileUtils.readFileToString(
new File(TEST_900_910_FILE_NAME), StandardCharsets.UTF_8));
displayQueryType(jaxb);
try {
ObjectQuery query = toObjectQuery(ObjectType.class, jaxb);
Expand Down
Expand Up @@ -25,7 +25,6 @@

/**
* @author semancik
*
*/
public class TestObjectValidator extends AbstractSchemaTest {

Expand All @@ -41,10 +40,7 @@ public class TestObjectValidator extends AbstractSchemaTest {

@Test
public void testValidateRoleOneDefault() throws Exception {
final String TEST_NAME = "testValidateRoleOneDefault";

// GIVEN

ObjectValidator validator = createValidator();

PrismObject<RoleType> object = PrismTestUtil.getPrismContext().parseObject(ROLE_ONE_FILE);
Expand All @@ -63,8 +59,6 @@ public void testValidateRoleOneDefault() throws Exception {

@Test
public void testValidateRoleOneDeprecated() throws Exception {
final String TEST_NAME = "testValidateRoleOneDeprecated";

// GIVEN

ObjectValidator validator = createValidator();
Expand All @@ -90,8 +84,6 @@ public void testValidateRoleOneDeprecated() throws Exception {
*/
@Test
public void testValidateRoleOneLegacyCompat() throws Exception {
final String TEST_NAME = "testValidateRoleOneLegacyCompat";

// GIVEN

ObjectValidator validator = createValidator();
Expand Down Expand Up @@ -120,8 +112,6 @@ public void testValidateRoleOneLegacyCompat() throws Exception {
*/
@Test
public void testValidateRoleOneLegacyStrict() throws Exception {
final String TEST_NAME = "testValidateRoleOneLegacyStrict";

// GIVEN

ObjectValidator validator = createValidator();
Expand All @@ -144,11 +134,7 @@ public void testValidateRoleOneLegacyStrict() throws Exception {
// We have no planned removal annotations in 4.0. Nothing to test.
// @Test
// public void testValidateRoleOnePlannedRemoval() throws Exception {
// final String TEST_NAME = "testValidateRoleOnePlannedRemoval";
// displayTestTile(TEST_NAME);
//
// // GIVEN
//
// ObjectValidator validator = createValidator();
// validator.setWarnPlannedRemoval(true);
//
Expand Down Expand Up @@ -179,7 +165,7 @@ private void assertWarnings(ValidationResult validationResult, Object... expecte
if (expectedItem instanceof ItemPath) {
expectedPath = (ItemPath)expectedItem;
} else if (expectedItem instanceof QName) {
expectedPath = ItemPath.create((QName)expectedItem);
expectedPath = ItemPath.create(expectedItem);
} else {
throw new IllegalArgumentException("What? "+expectedItem);
}
Expand Down
Expand Up @@ -5976,10 +5976,7 @@ protected ShadowAsserter<Void> assertModelShadow(String oid) throws ObjectNotFou

protected ShadowAsserter<Void> assertModelShadowNoFetch(String oid) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException {
PrismObject<ShadowType> repoShadow = getShadowModelNoFetch(oid);
ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(repoShadow, "model(noFetch)");
asserter
.display();
return asserter;
return ShadowAsserter.forShadow(repoShadow, "model(noFetch)").display();
}

protected ShadowAsserter<Void> assertModelShadowFuture(String oid) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException {
Expand Down
Expand Up @@ -138,6 +138,6 @@ protected Trace getLogger() {

protected String getContentType() {
return "text/html";
};
}

}
Expand Up @@ -264,7 +264,7 @@ private Object getVariableValue(String name, Mode mode) {
}
}

enum Mode { DEFAULT, OLD, ESTIMATED };
enum Mode { DEFAULT, OLD, ESTIMATED }

// NOT USED

Expand Down
Expand Up @@ -303,9 +303,7 @@ boolean decideOnApproval(CaseType subcase,
*/
@Test
public void test100AddJackToGuests() throws Exception {
final String TEST_NAME = "test100AddJackToGuests";

Task modelTask = taskManager.createTaskInstance(TEST_NAME);
Task modelTask = getTestTask();
OperationResult result = createOperationResult();
modelTask.setOwner(repositoryService.getObject(UserType.class, USER_ADMINISTRATOR_OID, null, result));

Expand Down Expand Up @@ -362,7 +360,7 @@ void assertsAfterImmediateExecutionFinished(CaseType task, OperationResult resul
void assertsRootCaseFinishes(CaseType aCase, List<CaseType> subcases, Task opTask,
OperationResult result) throws Exception { }
boolean decideOnApproval(CaseType subcase, ApprovalContextType wfContext) throws Exception { return true; }
String getObjectOid(CaseType task, OperationResult result) throws SchemaException { return null; };
String getObjectOid(CaseType task, OperationResult result) throws SchemaException { return null; }
boolean removeAssignmentsBeforeTest() { return true; }
}

Expand Down
6 changes: 0 additions & 6 deletions pom.xml
Expand Up @@ -146,7 +146,6 @@
<!-- Dependencies global versions -->
<commons.io.version>2.6</commons.io.version>
<commons.lang.version>2.6</commons.lang.version>
<commons.lang3.version>3.7</commons.lang3.version>
<commons.cli>1.2</commons.cli>
<cxf.version>3.3.1</cxf.version>
<cxf-xjc.version>3.3.0</cxf-xjc.version>
Expand Down Expand Up @@ -567,11 +566,6 @@
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons.lang3.version}</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
Expand Down

0 comments on commit 54ecf66

Please sign in to comment.