-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from wttech/add-data-source-support
added data source support
- Loading branch information
Showing
27 changed files
with
932 additions
and
42 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
52 changes: 52 additions & 0 deletions
52
....main/src/main/java/com/cognifide/apm/main/actions/internal/datasources/LevelsMapper.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,52 @@ | ||
/* | ||
* ========================LICENSE_START================================= | ||
* AEM Permission Management | ||
* %% | ||
* Copyright (C) 2013 Wunderman Thompson Technology | ||
* %% | ||
* 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. | ||
* =========================LICENSE_END================================== | ||
*/ | ||
package com.cognifide.apm.main.actions.internal.datasources; | ||
|
||
import com.cognifide.apm.api.actions.Action; | ||
import com.cognifide.apm.api.actions.annotations.Mapper; | ||
import com.cognifide.apm.api.actions.annotations.Mapping; | ||
import com.cognifide.apm.api.actions.annotations.Required; | ||
import com.cognifide.apm.main.actions.ActionGroup; | ||
import java.util.List; | ||
import org.apache.commons.lang3.NotImplementedException; | ||
|
||
@Mapper(value = "LEVELS", group = ActionGroup.DATASOURCE) | ||
public class LevelsMapper { | ||
|
||
@Mapping( | ||
examples = "LEVELS('/content', [\n" + | ||
"\t{regex: '(.+)_(.+)',paramNames: ['param1', 'param2']}, # 1st level\n" + | ||
"\t{excludeRegex: '.+:.+'}, # 2nd level\n" + | ||
"\t{template: '/apps/test/pageTemplate', resourceType: 'test/pageRenderer'}, # 3rd level\n" + | ||
"\t{properties: [ # 4th level\n" + | ||
"\t\t{name: 'jcr:primaryType', regex: 'cq:Page'},\n" + | ||
"\t\t{name: 'jcr:primaryType', excludeRegex: 'cq:PageContent'},\n" + | ||
"\t\t{name: 'jcr:content/cq:template', regex: '/apps/test/pageTemplate'},\n" + | ||
"\t\t{name: 'jcr:content/sling:resourceType', regex: 'test/pageRenderer'}\n" + | ||
"\t]}\n" + | ||
"])", | ||
reference = "Provides levels of content for given resource path matching given content structure map" | ||
) | ||
public Action mapAction( | ||
@Required(value = "rootPath", description = "Root path") String rootPath, | ||
@Required(value = "structureMap", description = "Map of content structure") List<Object> structureMap) { | ||
throw new NotImplementedException(""); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...s.main/src/main/java/com/cognifide/apm/main/actions/internal/datasources/LowerMapper.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,40 @@ | ||
/* | ||
* ========================LICENSE_START================================= | ||
* AEM Permission Management | ||
* %% | ||
* Copyright (C) 2013 Wunderman Thompson Technology | ||
* %% | ||
* 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. | ||
* =========================LICENSE_END================================== | ||
*/ | ||
package com.cognifide.apm.main.actions.internal.datasources; | ||
|
||
import com.cognifide.apm.api.actions.Action; | ||
import com.cognifide.apm.api.actions.annotations.Mapper; | ||
import com.cognifide.apm.api.actions.annotations.Mapping; | ||
import com.cognifide.apm.api.actions.annotations.Required; | ||
import com.cognifide.apm.main.actions.ActionGroup; | ||
import org.apache.commons.lang3.NotImplementedException; | ||
|
||
@Mapper(value = "LOWER", group = ActionGroup.DATASOURCE) | ||
public class LowerMapper { | ||
|
||
@Mapping( | ||
examples = "LOWER('en_GB')", | ||
reference = "Converts string to lower case" | ||
) | ||
public Action mapAction( | ||
@Required(value = "value", description = "string") String value) { | ||
throw new NotImplementedException(""); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...s.main/src/main/java/com/cognifide/apm/main/actions/internal/datasources/UpperMapper.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,40 @@ | ||
/* | ||
* ========================LICENSE_START================================= | ||
* AEM Permission Management | ||
* %% | ||
* Copyright (C) 2013 Wunderman Thompson Technology | ||
* %% | ||
* 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. | ||
* =========================LICENSE_END================================== | ||
*/ | ||
package com.cognifide.apm.main.actions.internal.datasources; | ||
|
||
import com.cognifide.apm.api.actions.Action; | ||
import com.cognifide.apm.api.actions.annotations.Mapper; | ||
import com.cognifide.apm.api.actions.annotations.Mapping; | ||
import com.cognifide.apm.api.actions.annotations.Required; | ||
import com.cognifide.apm.main.actions.ActionGroup; | ||
import org.apache.commons.lang3.NotImplementedException; | ||
|
||
@Mapper(value = "UPPER", group = ActionGroup.DATASOURCE) | ||
public class UpperMapper { | ||
|
||
@Mapping( | ||
examples = "UPPER('en_GB')", | ||
reference = "Converts string to upper case" | ||
) | ||
public Action mapAction( | ||
@Required(value = "value", description = "string") String value) { | ||
throw new NotImplementedException(""); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
...ain/src/main/java/com/cognifide/apm/main/actions/internal/datasources/ValueMapMapper.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 @@ | ||
/* | ||
* ========================LICENSE_START================================= | ||
* AEM Permission Management | ||
* %% | ||
* Copyright (C) 2013 Wunderman Thompson Technology | ||
* %% | ||
* 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. | ||
* =========================LICENSE_END================================== | ||
*/ | ||
package com.cognifide.apm.main.actions.internal.datasources; | ||
|
||
import com.cognifide.apm.api.actions.Action; | ||
import com.cognifide.apm.api.actions.annotations.Mapper; | ||
import com.cognifide.apm.api.actions.annotations.Mapping; | ||
import com.cognifide.apm.api.actions.annotations.Required; | ||
import com.cognifide.apm.main.actions.ActionGroup; | ||
import java.util.Map; | ||
import org.apache.commons.lang3.NotImplementedException; | ||
|
||
@Mapper(value = "VALUEMAP", group = ActionGroup.DATASOURCE) | ||
public class ValueMapMapper { | ||
|
||
@Mapping( | ||
examples = "VALUEMAP('/content/dam')", | ||
reference = "Provides value map with all properties for given resource path" | ||
) | ||
public Action mapAction( | ||
@Required(value = "path", description = "Resource path") String path) { | ||
throw new NotImplementedException(""); | ||
} | ||
|
||
@Mapping( | ||
examples = "VALUEMAP('/content/dam', {\n" + | ||
"\tregex: 'prop.+',\n" + | ||
"\texcludeRegex: '.+:.+'\n" + | ||
"})", | ||
reference = "Provides value map with properties which matching given regex expressions for given resource path" | ||
) | ||
public Action mapAction( | ||
@Required(value = "path", description = "Resource path") String path, | ||
@Required(value = "regexMap", description = "Map of regex expressions") Map<String, String> regex) { | ||
throw new NotImplementedException(""); | ||
} | ||
} |
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
Oops, something went wrong.