Skip to content

Commit

Permalink
fixed typos: shoudl->should, overriden->overridden + reformats
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Mar 10, 2020
1 parent 989b360 commit c67a047
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 49 deletions.
Expand Up @@ -8,17 +8,11 @@

import java.util.ArrayList;
import java.util.List;

import javax.xml.namespace.QName;

import com.evolveum.midpoint.prism.PrismReferenceValue;
import com.evolveum.midpoint.prism.polystring.PolyString;
import com.evolveum.midpoint.web.component.AjaxButton;
import com.evolveum.midpoint.web.component.assignment.AssignmentPanel;
import org.apache.commons.lang3.StringUtils;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
Expand All @@ -30,20 +24,15 @@
import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
import com.evolveum.midpoint.prism.Containerable;
import com.evolveum.midpoint.prism.PrismProperty;
import com.evolveum.midpoint.prism.polystring.PolyString;
import com.evolveum.midpoint.util.QNameUtil;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.web.component.AjaxButton;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;
import com.evolveum.midpoint.web.util.InfoTooltipBehavior;
import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractRoleType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ConstructionType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectPolicyConfigurationType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.PendingOperationType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;

public class DisplayNamePanel<C extends Containerable> extends BasePanel<C>{
public class DisplayNamePanel<C extends Containerable> extends BasePanel<C> {

private static final long serialVersionUID = 1L;

Expand All @@ -64,7 +53,7 @@ public DisplayNamePanel(String id, IModel<C> model) {
}

@Override
protected void onInitialize(){
protected void onInitialize() {
super.onInitialize();
initLayout();
}
Expand All @@ -87,7 +76,7 @@ private void initLayout() {
AjaxButton navigateToObject = new AjaxButton(ID_NAVIGATE_TO_OBJECT) {
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
if (DisplayNamePanel.this.getModelObject() instanceof ObjectType){
if (DisplayNamePanel.this.getModelObject() instanceof ObjectType) {
ObjectType o = (ObjectType) DisplayNamePanel.this.getModelObject();
ObjectReferenceType ort = new ObjectReferenceType();
ort.setOid(o.getOid());
Expand All @@ -97,7 +86,7 @@ public void onClick(AjaxRequestTarget ajaxRequestTarget) {
}
};
navigateToObject.add(new VisibleBehaviour(() -> DisplayNamePanel.this.getModelObject() instanceof ObjectType &&
WebComponentUtil.getObjectDetailsPage(((ObjectType)DisplayNamePanel.this.getModelObject()).getClass()) != null));
WebComponentUtil.getObjectDetailsPage(((ObjectType) DisplayNamePanel.this.getModelObject()).getClass()) != null));
navigateToObject.setOutputMarkupId(true);
add(navigateToObject);

Expand Down Expand Up @@ -129,14 +118,14 @@ protected void populateItem(ListItem<String> item) {
}

private boolean isObjectPolicyConfigurationType() {
if(QNameUtil.match(ObjectPolicyConfigurationType.COMPLEX_TYPE, getModelObject().asPrismContainerValue().getComplexTypeDefinition().getTypeName())) {
if (QNameUtil.match(ObjectPolicyConfigurationType.COMPLEX_TYPE, getModelObject().asPrismContainerValue().getComplexTypeDefinition().getTypeName())) {
return true;
}
return false;
}

protected String createImageModel() {
if (getModelObject() == null){
if (getModelObject() == null) {
return "";
}
if (ConstructionType.class.isAssignableFrom(getModelObject().getClass())) {
Expand All @@ -149,21 +138,21 @@ protected String createImageModel() {

private IModel<String> createHeaderModel() {
// TODO: align with DisplayNameModel
if (getModelObject() == null){
if (getModelObject() == null) {
return Model.of("");
}
if (ObjectType.class.isAssignableFrom(getModelObject().getClass())) {
return Model.of(WebComponentUtil.getEffectiveName((ObjectType) getModelObject(), AbstractRoleType.F_DISPLAY_NAME));
}
if (isObjectPolicyConfigurationType()) {
QName typeValue = WebComponentUtil.getValue(getModel().getObject().asPrismContainerValue(), ObjectPolicyConfigurationType.F_TYPE, QName.class);
ObjectReferenceType objectTemplate = ((ObjectPolicyConfigurationType)getModel().getObject()).getObjectTemplateRef();
if(objectTemplate == null || objectTemplate.getTargetName() == null){
ObjectReferenceType objectTemplate = ((ObjectPolicyConfigurationType) getModel().getObject()).getObjectTemplateRef();
if (objectTemplate == null || objectTemplate.getTargetName() == null) {
return Model.of("");
}
String objectTemplateNameValue = objectTemplate.getTargetName().toString();
StringBuilder sb = new StringBuilder();
if(typeValue != null) {
if (typeValue != null) {
sb.append(typeValue.getLocalPart()).append(" - ");
}
sb.append(objectTemplateNameValue);
Expand All @@ -177,7 +166,7 @@ private IModel<String> createHeaderModel() {
}

private IModel<String> createIdentifierModel() {
if (getModelObject() == null){
if (getModelObject() == null) {
return Model.of("");
}
if (AbstractRoleType.class.isAssignableFrom(getModelObject().getClass())) {
Expand All @@ -187,7 +176,7 @@ private IModel<String> createIdentifierModel() {
}

private boolean isIdentifierVisible() {
if (getModelObject() == null){
if (getModelObject() == null) {
return false;
}
if (AbstractRoleType.class.isAssignableFrom(getModelObject().getClass())) {
Expand Down Expand Up @@ -216,21 +205,21 @@ private String getRelationLabel() {
}

protected IModel<String> getKindIntentLabelModel() {
// To be overriden in subclasses
// To be overridden in subclasses
return Model.of("");
}

protected IModel<String> getDescriptionLabelModel() {
if(getModel().getObject() != null && getModel().getObject().asPrismContainerValue().contains(ObjectType.F_DESCRIPTION)) {
if (getModel().getObject() != null && getModel().getObject().asPrismContainerValue().contains(ObjectType.F_DESCRIPTION)) {
return new PropertyModel<String>(getModel(), ObjectType.F_DESCRIPTION.getLocalPart());
}
return null;
}

protected IModel<List<String>> getDescriptionLabelsModel() {
List<String> descriptionLabels = new ArrayList<String>();
IModel<String> des= getDescriptionLabelModel();
if(des != null) {
IModel<String> des = getDescriptionLabelModel();
if (des != null) {
descriptionLabels.add(des.getObject());
}
return new IModel<List<String>>() {
Expand All @@ -243,7 +232,7 @@ public List<String> getObject() {
}

protected QName getRelation() {
// To be overriden in subclasses
// To be overridden in subclasses
return null;
}
}
Expand Up @@ -93,7 +93,7 @@ public void initalizeModel() {
@Override
protected UserType load() {
//TODO: fix this... part of this is executed in object wrapper facotry..
// but the prism object in object wrapper was overriden with this loading..
// but the prism object in object wrapper was overridden with this loading..
MidPointPrincipal principal = SecurityUtils.getPrincipalUser();
Task task = createSimpleTask("load self");
PrismObject<UserType> user = WebModelServiceUtils.loadObject(UserType.class, principal.getOid(), PagePostAuthentication.this, task, task.getResult());
Expand Down
Expand Up @@ -470,7 +470,7 @@ static <T> RefinedAttributeDefinition<T> parse(ResourceAttributeDefinition<T> sc
previousLimitations = limitations;
if (schemaHandlingAttrDefType != null) {
if (layer != LayerType.SCHEMA) {
// SCHEMA is a pseudo-layer. It cannot be overriden ... unless specified explicitly
// SCHEMA is a pseudo-layer. It cannot be overridden ... unless specified explicitly
PropertyLimitationsType genericLimitationsType = MiscSchemaUtil.getLimitationsType(schemaHandlingAttrDefType.getLimitations(), null);
if (genericLimitationsType != null) {
applyLimitationsType(limitations, genericLimitationsType);
Expand Down
Expand Up @@ -23750,7 +23750,7 @@
<xsd:documentation>
<p>
Symbolic name for this view. It is used as a view identifier. Views with the same name will be merged together.
The name is used to detect whether a particular view is overriden, e.g. if view defined in system configuraiton
The name is used to detect whether a particular view is overridden, e.g. if view defined in system configuraiton
is overridden in the role. It may also be used by other system components (e.g. dashboard widgets, reports)
to refer to this view. It will also be used for diagnostics, logging and so on.
</p>
Expand Down
Expand Up @@ -508,8 +508,8 @@
<xsd:enumeration value="none">
<xsd:annotation>
<xsd:documentation>
There is no special requrement for attribute content. E.g. only the changed attributes
shoudl be passed into the update operation.
There is no special requirement for attribute content. E.g. only the changed attributes
should be passed into the update operation.
</xsd:documentation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="NONE"/>
Expand Down Expand Up @@ -699,7 +699,7 @@
<xsd:documentation>
Indication that ADD and REMOVE of attribute values is reliably supported.
If this capability is not present or disabled, READ+REPLACE mode is assumed.
(Can be overriden at the level of individual attributes via readReplaceMode property.)
(Can be overridden at the level of individual attributes via readReplaceMode property.)

BEWARE: READ+REPLACE is currently supported for attributes only - not for subjectToObject associations.

Expand Down
12 changes: 6 additions & 6 deletions infra/test-util/src/test/resources/standard/XMLSchema.dtd
@@ -1,7 +1,7 @@
<!--
~ Copyright (c) 2010-2013 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->

Expand All @@ -24,7 +24,7 @@
are defined in XML Schema: Part 2: Datatypes -->
<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >

<!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a
<!ENTITY % p 'xs:'> <!-- can be overridden in the internal subset of a
schema document to establish a different
namespace prefix -->
<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must
Expand Down Expand Up @@ -137,7 +137,7 @@
because at the Infoset level where schemas operate,
xmlns(:prefix) is NOT an attribute! -->
<!-- The declaration of xmlns is a convenience for schema authors -->

<!-- The id attribute here and below is for use in external references
from non-schemas using simple fragment identifiers.
It is NOT used for schema-to-schema reference, internal or
Expand All @@ -161,7 +161,7 @@
%complexTypeAttrs;>

<!-- particleAndAttrs is shorthand for a root type -->
<!-- mixed is disallowed if simpleContent, overriden if complexContent
<!-- mixed is disallowed if simpleContent, overridden if complexContent
has one too. -->

<!-- If anyAttribute appears in one or more referenced attributeGroups
Expand All @@ -181,7 +181,7 @@
id ID #IMPLIED
%simpleContentAttrs;>

<!-- restriction should use the simple branch from part2, not the
<!-- restriction should use the simple branch from part2, not the
one defined above; extension should have no particle -->

<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
Expand Down Expand Up @@ -221,7 +221,7 @@
<!-- default and fixed are mutually exclusive -->

<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
<!ATTLIST %group;
<!ATTLIST %group;
name %NCName; #IMPLIED
ref %QName; #IMPLIED
minOccurs %nonNegativeInteger; #IMPLIED
Expand Down
2 changes: 1 addition & 1 deletion infra/test-util/src/test/resources/standard/XMLSchema.xsd
Expand Up @@ -458,7 +458,7 @@
<xs:annotation>
<xs:documentation>
Not allowed if simpleContent child is chosen.
May be overriden by setting on complexContent child.</xs:documentation>
May be overridden by setting on complexContent child.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
Expand Down
Expand Up @@ -746,7 +746,7 @@ public void test160AddSelfMadeMan() throws Exception {

/**
* Add "fraudster" user with an archetypeRef. In this case the archetypeRef does not match the assignment.
* This operation shoudl be denied.
* This operation should be denied.
* MID-5909
*/
@Test
Expand Down
Expand Up @@ -88,7 +88,7 @@ public boolean isAccountRelated() {
}

public boolean isUserRelated() {
return false; // overriden in ModelEvent
return false; // overridden in ModelEvent
}

public boolean isWorkItemRelated() {
Expand Down
Expand Up @@ -522,7 +522,7 @@ private String addShadowAttempt(ProvisioningContext ctx,
// // HACK HACK HACK, not really right solution.
// // We need this for reliable uniqueness check in preAddChecks() and addResourceObject()
// // Maybe the right solution would be to pass opState as a parameter to addResourceObject()?
// // Or maybe addResourceObject() should not check uniqueness and we shoudl check it here?
// // Or maybe addResourceObject() should not check uniqueness and we should check it here?
// shadowToAdd.setOid(opState.getRepoShadow().getOid());
// }

Expand Down
Expand Up @@ -23,7 +23,7 @@ public interface ShadowResultHandler {
/**
* Handle a single result.
* @param object Resource object to process.
* @return true if the operation shoudl proceed, false if it should stop
* @return true if the operation should proceed, false if it should stop
*/
boolean handle(PrismObject<ShadowType> object);

Expand Down
Expand Up @@ -1282,7 +1282,7 @@ private void assertBarbossaDisabled(String password) throws Exception {
}

/**
* This should create account with a group. And the account shoudl be disabled.
* This should create account with a group. And the account should be disabled.
*/
@Test
public void test250AssignGuybrushPirates() throws Exception {
Expand Down

0 comments on commit c67a047

Please sign in to comment.