-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Report Builder] Path List Executor Implementation (#1919)
* path list executor implemented. textarea param added * change log updated * make codeclimate happy * code review fix * make code climate happy * versions fix * PathListReportExecutor covered with tests * make code climate happy * another one test fix * fixing UnfinishedStubbingException * updating change CHANGELOG * make code climate and baseline happy * using ReportExecutorProvider implementation instead of getReportExecutor method
- Loading branch information
1 parent
81a6cbe
commit 9cddca0
Showing
19 changed files
with
633 additions
and
61 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
bundle/src/main/java/com/adobe/acs/commons/assets/package-info.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,21 @@ | ||
/* | ||
* #%L | ||
* ACS AEM Commons Bundle | ||
* %% | ||
* Copyright (C) 2018 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% | ||
*/ | ||
@org.osgi.annotation.versioning.Version("4.3.4") | ||
package com.adobe.acs.commons.assets; |
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
24 changes: 24 additions & 0 deletions
24
bundle/src/main/java/com/adobe/acs/commons/packaging/util/package-info.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,24 @@ | ||
/* | ||
* #%L | ||
* ACS AEM Commons Bundle | ||
* %% | ||
* Copyright (C) 2013 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% | ||
*/ | ||
/** | ||
* Packaging utilities. | ||
*/ | ||
@org.osgi.annotation.versioning.Version("4.3.4") | ||
package com.adobe.acs.commons.packaging.util; |
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
54 changes: 54 additions & 0 deletions
54
bundle/src/main/java/com/adobe/acs/commons/reports/internal/ReportExecutorProvider.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,54 @@ | ||
/* | ||
* #%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% | ||
*/ | ||
package com.adobe.acs.commons.reports.internal; | ||
|
||
import com.adobe.acs.commons.reports.api.ReportException; | ||
import org.apache.commons.lang.StringUtils; | ||
import org.apache.sling.api.resource.Resource; | ||
import org.apache.sling.commons.classloader.DynamicClassLoaderManager; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import static com.adobe.acs.commons.reports.models.ReportRunner.PN_EXECUTOR; | ||
|
||
public final class ReportExecutorProvider { | ||
|
||
public static final ReportExecutorProvider INSTANCE = new ReportExecutorProvider(); | ||
|
||
private static final Logger log = LoggerFactory.getLogger(ReportExecutorProvider.class); | ||
|
||
private ReportExecutorProvider() { | ||
} | ||
|
||
public Class<?> getReportExecutor(DynamicClassLoaderManager dynamicClassLoaderManager, Resource config) | ||
throws ReportException { | ||
String reportExecutorClass = config.getValueMap().get(PN_EXECUTOR, String.class); | ||
if (StringUtils.isBlank(reportExecutorClass)) { | ||
throw new ReportException("No executor configuration found for " + config); | ||
} | ||
|
||
try { | ||
log.debug("Loading class for: {}", reportExecutorClass); | ||
return Class.forName(reportExecutorClass, true, dynamicClassLoaderManager.getDynamicClassLoader()); | ||
} catch (ClassNotFoundException ex) { | ||
throw new ReportException("Unable to find class for " + reportExecutorClass, ex); | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
bundle/src/main/java/com/adobe/acs/commons/reports/models/PathListReportConfig.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,34 @@ | ||
/* | ||
* #%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% | ||
*/ | ||
package com.adobe.acs.commons.reports.models; | ||
|
||
import org.apache.sling.api.resource.Resource; | ||
import org.apache.sling.models.annotations.Model; | ||
|
||
import javax.inject.Inject; | ||
|
||
@Model(adaptables = Resource.class) | ||
public interface PathListReportConfig { | ||
@Inject | ||
int getPageSize(); | ||
|
||
@Inject | ||
String getPathArea(); | ||
} |
Oops, something went wrong.