Skip to content

Commit

Permalink
use AemObjectReflectionToStringBuilder from wcm commons
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Jun 18, 2024
1 parent 02fb329 commit 91a387f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 192 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.wcm.commons</artifactId>
<version>1.10.0</version>
<version>1.10.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/wcm/handler/media/Media.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ public void setMediaInvalidReasonCustomMessage(@Nullable String mediaInvalidReas
@Override
public String toString() {
ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
sb.append("valid", isValid());
if (isValid()) {
sb.append("url", getUrl());
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/wcm/handler/media/MediaArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
import org.osgi.annotation.versioning.ProviderType;

import io.wcm.handler.media.format.MediaFormat;
import io.wcm.handler.media.impl.AemObjectsReflectionToStringBuilder;
import io.wcm.handler.media.markup.DragDropSupport;
import io.wcm.handler.media.markup.IPERatioCustomize;
import io.wcm.handler.mediasource.dam.AemRenditionType;
import io.wcm.handler.url.UrlMode;
import io.wcm.wcm.commons.contenttype.FileExtension;
import io.wcm.wcm.commons.util.AemObjectReflectionToStringBuilder;

/**
* Holds parameters to influence the media resolving process.
Expand Down Expand Up @@ -844,7 +844,7 @@ public String toString() {
sb.append("webOptimizedImageDeliveryDisabled", webOptimizedImageDeliveryDisabled);
}
if (properties != null && !properties.isEmpty()) {
sb.append("properties", AemObjectsReflectionToStringBuilder.filteredValueMap(properties));
sb.append("properties", AemObjectReflectionToStringBuilder.filteredValueMap(properties));
}
return sb.build();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/wcm/handler/media/MediaRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.jetbrains.annotations.Nullable;
import org.osgi.annotation.versioning.ProviderType;

import io.wcm.handler.media.impl.AemObjectsReflectionToStringBuilder;
import io.wcm.wcm.commons.util.AemObjectReflectionToStringBuilder;

/**
* Holds all properties that are part of a media handling request.
Expand Down Expand Up @@ -123,7 +123,7 @@ public String toString() {
io.wcm.wcm.commons.util.ToStringStyle.SHORT_PREFIX_OMIT_NULL_STYLE);
if (resource != null) {
sb.append("resource", resource.getPath());
sb.append("resourceProperties", AemObjectsReflectionToStringBuilder.filteredValueMap(resource.getValueMap()));
sb.append("resourceProperties", AemObjectReflectionToStringBuilder.filteredValueMap(resource.getValueMap()));
}
if (mediaRef != null) {
sb.append("mediaRef", mediaRef);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
import io.wcm.handler.media.Rendition;
import io.wcm.handler.media.UriTemplate;
import io.wcm.handler.media.UriTemplateType;
import io.wcm.handler.media.impl.AemObjectsReflectionToStringBuilder;
import io.wcm.handler.media.spi.MediaHandlerConfig;
import io.wcm.handler.mediasource.dam.AssetRendition;
import io.wcm.handler.mediasource.dam.impl.dynamicmedia.DynamicMediaSupportService;
import io.wcm.handler.mediasource.dam.impl.weboptimized.WebOptimizedImageDeliveryService;
import io.wcm.wcm.commons.util.AemObjectReflectionToStringBuilder;

/**
* {@link Asset} implementation for DAM assets.
Expand Down Expand Up @@ -224,7 +224,7 @@ public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {

@Override
public String toString() {
return new AemObjectsReflectionToStringBuilder(this,
return new AemObjectReflectionToStringBuilder(this,
io.wcm.wcm.commons.util.ToStringStyle.SHORT_PREFIX_OMIT_NULL_STYLE).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import io.wcm.handler.media.Rendition;
import io.wcm.handler.media.UriTemplate;
import io.wcm.handler.media.UriTemplateType;
import io.wcm.handler.media.impl.AemObjectsReflectionToStringBuilder;
import io.wcm.handler.media.spi.MediaHandlerConfig;
import io.wcm.wcm.commons.util.AemObjectReflectionToStringBuilder;

/**
* {@link Asset} implementation for inline media objects stored in a node in a content page.
Expand Down Expand Up @@ -168,7 +168,7 @@ public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {

@Override
public String toString() {
return new AemObjectsReflectionToStringBuilder(this,
return new AemObjectReflectionToStringBuilder(this,
io.wcm.wcm.commons.util.ToStringStyle.SHORT_PREFIX_OMIT_NULL_STYLE).build();
}

Expand Down

This file was deleted.

0 comments on commit 91a387f

Please sign in to comment.