Skip to content

Commit

Permalink
merge with pull request Adobe-Consulting-Services#1133
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Kozlov committed Oct 12, 2017
2 parents c0aa075 + 181257c commit 17aec53
Show file tree
Hide file tree
Showing 23 changed files with 2,124 additions and 178 deletions.
46 changes: 43 additions & 3 deletions bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
sun.misc.*;resolution:=optional,
org.apache.sling.models.annotations.*;resolution:=optional, <!-- the used class InjectionStrategy is only since Sling Models API 1.2 -->
org.apache.sling.models.spi.injectorspecific.*;resolution:=optional, <!-- that package was added with Sling Models API 1.1 -->
com.amazonaws.*;resolution:=optional,
com.day.cq.wcm.workflow.process;version="[6.0,8)", <!-- using a wider version range for forward compatibility -->
com.day.cq.mailer;version="[5.9,7)", <!-- using a wider version range for forward compatibility -->
com.adobe.cq.sightly;version="[2.5,4)",
Expand Down Expand Up @@ -294,6 +295,12 @@
<artifactId>tika-parsers</artifactId>
<version>1.14</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-osgi</artifactId>
<version>1.10.76</version>
<scope>provided</scope>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>org.mockito</groupId>
Expand Down Expand Up @@ -349,8 +356,8 @@
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
<version>2.10.1</version>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>2.12.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -359,13 +366,23 @@
<version>1.0-R1534292</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.sling-mock</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.sling-mock-jackrabbit</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
Expand All @@ -378,6 +395,12 @@
<dependency>
<groupId>io.wcm</groupId>
<artifactId>io.wcm.testing.aem-mock</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
Expand All @@ -387,7 +410,24 @@
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
</dependency>

<dependency>
<groupId>me.alexpanov</groupId>
<artifactId>free-port-finder</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.findify</groupId>
<artifactId>s3mock_2.11</artifactId>
<version>0.2.3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- put UberJar last so that more specific artifacts take precedence -->
<dependency>
<groupId>com.adobe.aem</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public class SharpenImageTransformerImpl implements ImageTransformer {
static final String TYPE = "sharpen";

private static final String KEY_UNSHARP_MASK = "op_usm";
private static final int NUM_SHARPEN_PARAMS = 2;


@Override
public final Layer transform(final Layer layer, final ValueMap properties) {
Expand All @@ -70,12 +72,12 @@ public final Layer transform(final Layer layer, final ValueMap properties) {
String[] param = unsharpenMask.split(",");

// Support is provided for amount and radius only.
if(param.length <= 4 && param.length >= 2) {
if(param.length == NUM_SHARPEN_PARAMS) {
float amount = Float.parseFloat(param[0]);
float radius = Float.parseFloat(param[1]);
layer.sharpen(amount, radius);
} else {
log.warn("Transform [ {} ] requires 2 or 4 parameters.", TYPE);
log.warn("Transform [ {} ] requires 2 parameters.", TYPE);
}
}
} catch (NumberFormatException exception) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2017 Adobe.
*
* 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.adobe.acs.commons.mcp.form;

import aQute.bnd.annotation.ProviderType;

/**
* Text field component
*/
@ProviderType
public class PasswordComponent extends FieldComponent {
@Override
public void init() {
setResourceType("granite/ui/components/coral/foundation/form/password");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* #%L
* ACS AEM Commons Bundle
* %%
* Copyright (C) 2017 Adobe
* %%
* 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.
* #L%
*/
@aQute.bnd.annotation.Version("3.11.0")
package com.adobe.acs.commons.mcp.form;

Loading

0 comments on commit 17aec53

Please sign in to comment.