Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generating default "additional information" information for exclusion…
… and generic triggers.
- Loading branch information
Showing
23 changed files
with
503 additions
and
145 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...gui/src/main/java/com/evolveum/midpoint/web/page/admin/workflow/InformationListPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 2010-2017 Evolveum | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
|
||
<div wicket:id="informationList"> | ||
<div wicket:id="information"/> | ||
</div> | ||
|
||
</wicket:panel> | ||
</html> |
49 changes: 49 additions & 0 deletions
49
...gui/src/main/java/com/evolveum/midpoint/web/page/admin/workflow/InformationListPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2010-2017 Evolveum | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.evolveum.midpoint.web.page.admin.workflow; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.InformationType; | ||
import org.apache.wicket.markup.html.list.ListItem; | ||
import org.apache.wicket.markup.html.list.ListView; | ||
import org.apache.wicket.model.IModel; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author mederly | ||
*/ | ||
public class InformationListPanel extends BasePanel<List<InformationType>> { | ||
|
||
private static final String ID_INFORMATION_LIST = "informationList"; | ||
private static final String ID_INFORMATION = "information"; | ||
|
||
public InformationListPanel(String id, IModel<List<InformationType>> model) { | ||
super(id, model); | ||
initLayout(); | ||
} | ||
|
||
private void initLayout() { | ||
ListView<InformationType> list = new ListView<InformationType>(ID_INFORMATION_LIST, getModel()) { | ||
@Override | ||
protected void populateItem(ListItem<InformationType> item) { | ||
item.add(new InformationPanel(ID_INFORMATION, item.getModel())); | ||
} | ||
}; | ||
add(list); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...min-gui/src/main/java/com/evolveum/midpoint/web/page/admin/workflow/InformationPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 2010-2017 Evolveum | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
|
||
<h3 wicket:id="title"/> | ||
<div wicket:id="parts"> | ||
<div wicket:id="part" class="well well-sm"></div> | ||
</div> | ||
|
||
</wicket:panel> | ||
</html> |
62 changes: 62 additions & 0 deletions
62
...min-gui/src/main/java/com/evolveum/midpoint/web/page/admin/workflow/InformationPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright (c) 2010-2017 Evolveum | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.evolveum.midpoint.web.page.admin.workflow; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.web.component.util.VisibleBehaviour; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.InformationPartType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.InformationType; | ||
import org.apache.wicket.markup.html.basic.Label; | ||
import org.apache.wicket.markup.html.list.ListItem; | ||
import org.apache.wicket.markup.html.list.ListView; | ||
import org.apache.wicket.model.IModel; | ||
import org.apache.wicket.model.PropertyModel; | ||
|
||
/** | ||
* @author mederly | ||
*/ | ||
public class InformationPanel extends BasePanel<InformationType> { | ||
|
||
private static final String ID_TITLE = "title"; | ||
private static final String ID_PARTS = "parts"; | ||
private static final String ID_PART = "part"; | ||
|
||
public InformationPanel(String id, IModel<InformationType> model) { | ||
super(id, model); | ||
initLayout(); | ||
} | ||
|
||
private void initLayout() { | ||
Label titleLabel = new Label(ID_TITLE, new PropertyModel<>(getModel(), InformationType.F_TITLE.getLocalPart())); | ||
titleLabel.add(new VisibleBehaviour(() -> getModelObject().getTitle() != null)); | ||
add(titleLabel); | ||
|
||
ListView<InformationPartType> list = new ListView<InformationPartType>(ID_PARTS, | ||
new PropertyModel<>(getModel(), InformationType.F_PART.getLocalPart())) { | ||
@Override | ||
protected void populateItem(ListItem<InformationPartType> item) { | ||
InformationPartType part = item.getModelObject(); | ||
Label label = new Label(ID_PART, part.getText()); | ||
if (Boolean.TRUE.equals(part.isHasMarkup())) { | ||
label.setEscapeModelStrings(false); | ||
} | ||
item.add(label); | ||
} | ||
}; | ||
add(list); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.