Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into access-certification
- Loading branch information
Showing
45 changed files
with
2,266 additions
and
327 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
53 changes: 53 additions & 0 deletions
53
gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/search/MoreDialogDto.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,53 @@ | ||
/* | ||
* Copyright (c) 2010-2015 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.component.search; | ||
|
||
import java.io.Serializable; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* @author Viliam Repan (lazyman) | ||
*/ | ||
public class MoreDialogDto implements Serializable { | ||
|
||
public static final String F_NAME_FILTER = "nameFilter"; | ||
public static final String F_PROPERTIES = "properties"; | ||
|
||
private String nameFilter; | ||
|
||
private List<Property> properties; | ||
|
||
public String getNameFilter() { | ||
return nameFilter; | ||
} | ||
|
||
public void setNameFilter(String nameFilter) { | ||
this.nameFilter = nameFilter; | ||
} | ||
|
||
public List<Property> getProperties() { | ||
if (properties == null) { | ||
properties = new ArrayList<>(); | ||
} | ||
return properties; | ||
} | ||
|
||
public void setProperties(List<Property> properties) { | ||
this.properties = properties; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...min-gui/src/main/java/com/evolveum/midpoint/web/component/search/ObjectBrowserDialog.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,36 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
~ Copyright (c) 2010-2013 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. | ||
--> | ||
<wicket:panel xmlns:wicket="http://wicket.apache.org"> | ||
<div class="modal fade"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||
<span aria-hidden="true">×</span></button> | ||
<h4 class="modal-title">Modal title</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<p>One fine body…</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
<button type="button" class="btn btn-primary">Save changes</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</wicket:panel> |
32 changes: 32 additions & 0 deletions
32
...min-gui/src/main/java/com/evolveum/midpoint/web/component/search/ObjectBrowserDialog.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,32 @@ | ||
/* | ||
* Copyright (c) 2010-2015 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.component.search; | ||
|
||
import com.evolveum.midpoint.web.component.util.SimplePanel; | ||
import org.apache.wicket.model.IModel; | ||
|
||
/** | ||
* @author Viliam Repan (lazyman) | ||
*/ | ||
public class ObjectBrowserDialog extends SimplePanel { | ||
|
||
public ObjectBrowserDialog(String id, IModel model) { | ||
super(id, model); | ||
} | ||
|
||
//todo implement | ||
} |
110 changes: 110 additions & 0 deletions
110
gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/search/Property.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,110 @@ | ||
/* | ||
* Copyright (c) 2010-2015 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.component.search; | ||
|
||
import com.evolveum.midpoint.prism.ItemDefinition; | ||
import org.apache.commons.lang.StringUtils; | ||
import org.apache.commons.lang.Validate; | ||
import org.apache.commons.lang.builder.ToStringBuilder; | ||
import org.apache.wicket.model.IModel; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* @author Viliam Repan (lazyman) | ||
*/ | ||
public class Property implements Serializable, Comparable<Property> { | ||
|
||
public static final String F_SELECTED = "selected"; | ||
public static final String F_NAME = "name"; | ||
|
||
private boolean selected; | ||
private ItemDefinition definition; | ||
|
||
public Property(ItemDefinition definition) { | ||
Validate.notNull(definition, "Property name must no be null"); | ||
|
||
this.definition=definition; | ||
} | ||
|
||
public ItemDefinition getDefinition() { | ||
return definition; | ||
} | ||
|
||
public String getName() { | ||
return getItemDefinitionName(definition); | ||
} | ||
|
||
public boolean isSelected() { | ||
return selected; | ||
} | ||
|
||
public void setSelected(boolean selected) { | ||
this.selected = selected; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
Property property = (Property) o; | ||
|
||
if (selected != property.selected) return false; | ||
return !(definition != null ? !definition.equals(property.definition) : property.definition != null); | ||
|
||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = (selected ? 1 : 0); | ||
result = 31 * result + (definition != null ? definition.hashCode() : 0); | ||
return result; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this) | ||
.append("definition", definition) | ||
.append("selected", selected) | ||
.toString(); | ||
} | ||
|
||
@Override | ||
public int compareTo(Property o) { | ||
String n1 = getItemDefinitionName(definition); | ||
String n2 = getItemDefinitionName(o.definition); | ||
|
||
if (n1 == null || n2 == null) { | ||
return 0; | ||
} | ||
|
||
return String.CASE_INSENSITIVE_ORDER.compare(n1, n2); | ||
} | ||
|
||
private String getItemDefinitionName(ItemDefinition def) { | ||
if (def == null) { | ||
return null; | ||
} | ||
|
||
String name = def.getDisplayName(); | ||
if (StringUtils.isEmpty(name)) { | ||
name = def.getName().getLocalPart(); | ||
} | ||
return name; | ||
} | ||
} |
Oops, something went wrong.