Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/aem remote assets #1707

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
1cdb120
Initial commit for AEM Remote Assets - this is extremely rough and in…
HitmanInWis Mar 1, 2018
3cff996
Updated AEM Remote Assets to set event-user-data that worflow launche…
HitmanInWis Mar 1, 2018
953ba05
Updated Remote Assets to leverage a service user instead of the admin…
HitmanInWis Mar 1, 2018
2cfda89
Updated Remote Assets to avoid sync'ing binaries for resource fetches…
HitmanInWis Mar 2, 2018
bac5b5d
Misc cleanups to Remote Assets
HitmanInWis Mar 2, 2018
553e40b
Updated Remote Assets to avoid sync'ing binaries for admin user since…
HitmanInWis Mar 2, 2018
b95862e
Updated the placeholder assets - these can probably be further optimi…
HitmanInWis Mar 2, 2018
48a6274
Added the first batch of Remote Asset binary files
josh-lenius Mar 5, 2018
f22f300
[AEMIP-174] - Remote asset content sync WIP.
Mar 5, 2018
7da687b
Merge branch 'feature/aem-remote-assets' of https://github.com/HS2-SO…
Mar 5, 2018
487c556
Merge branch 'feature/aem-remote-assets' of https://github.com/HS2-SO…
Mar 5, 2018
6008ea9
[AEMIP-174] - Remote Assets JCR Tree Sync - added temporary binaries …
Mar 7, 2018
5b9428f
[AEMIP-174] - Moved basic auth encoding to activate method to help wi…
Mar 7, 2018
c9e61fc
[AEMIP-174] - Remote assets - updated sync logic to handle dates, exi…
Mar 7, 2018
8a96be8
[AEMIP-174] - Remote assets - minor fixes.
Mar 8, 2018
9f772eb
Cleaned up licensing
HitmanInWis Mar 8, 2018
ecc3057
Merge remote-tracking branch 'origin/feature/aem-remote-assets' into …
HitmanInWis Mar 8, 2018
e1317d3
Added support for Long properties in remote assets.
HitmanInWis Mar 8, 2018
3404eaf
[AEMIP-174] - Remote assets - felix trigger, tag syncing, fixes.
Mar 8, 2018
b8a9d7d
[AEMIP-174] - Remote assets - updated decorator to account for both s…
Mar 8, 2018
b6378dd
Updated remote assets node sync to ignore binary properties, and to c…
HitmanInWis Mar 8, 2018
c9c92fe
[AEMIP-174] - Remote assets - bug fixes for tags, removed checks on c…
Mar 9, 2018
92faccb
Updated remote asset configs to require server/user/pass and to fix w…
HitmanInWis Mar 9, 2018
e2e7d3d
Updated remote asset configs to filter out blank sync paths
HitmanInWis Mar 9, 2018
e47e50d
[AEMIP-174] - Remote assets - removed unneeded ParseException and cod…
Mar 9, 2018
2cbd63c
[AEMIP-174] - Remote assets - removed test servlets, added javadocs, …
Mar 9, 2018
50723f4
[AEMIP-174] - Remote assets - added missing return type in javadoc.
Mar 9, 2018
0d39614
[AEMIP-174] - Remote assets - corrected URI bug, implemented configur…
Mar 9, 2018
5b7d6ac
[AEMIP-174] - Remote assets - added sync cronjob, added debug logging…
Mar 12, 2018
5d56ce2
[AEMIP-174] - Remote assets - added missing JavaDoc.
Mar 12, 2018
9173810
[AEMIP-174] - Remote assets - made logger static.
Mar 12, 2018
d5d51f1
[AEMIP-174] - Remote assets - fixed mime type bugs.
Mar 12, 2018
6895f1f
[AEMIP-174] - Remote assets - fixed mime type bugs.
Mar 13, 2018
5f76a4e
Added the second batch of Remote Asset binary files
josh-lenius Mar 13, 2018
714c3f6
[AEMIP-174] - Remote assets - corrected mimetype strings and removed …
Mar 13, 2018
e9ea2ae
Merge remote-tracking branch 'origin/feature/aem-remote-assets' into …
Mar 13, 2018
8463f09
[AEMIP-174] - Remote assets - corrected bug with indd files, class na…
Mar 13, 2018
752cb6f
[AEMIP-174] - Remote assets - added support for more temporary binari…
Mar 13, 2018
61d1f60
[AEMIP-174] - Remote assets - fixed binary sync bug with unknown rend…
Mar 14, 2018
4154a30
[AEMIP-174] - Remote assets - refactored method names and added file …
Mar 14, 2018
126d96d
Merge remote-tracking branch 'origin/master' into feature/aem-remote-…
HitmanInWis Mar 16, 2018
6e14d12
Added the third batch of remote asset binary files
josh-lenius Mar 16, 2018
6d5ac8f
[AEMIP-174] - Remote assets - PR revisions.
Mar 16, 2018
68900f6
Merge remote-tracking branch 'origin/feature/aem-remote-assets' into …
Mar 16, 2018
5a599b3
[AEMIP-174] - Remote assets - changed JcrConstants to new version (ol…
Mar 16, 2018
6c95651
[AEMIP-174] - Remote assets - added support for more temporary binari…
Mar 16, 2018
7e580af
[AEMIP-174] - Remote assets - revisions from PR feedback.
Mar 16, 2018
e89659f
Merge remote-tracking branch 'upstream/master' into feature/aem-remot…
HitmanInWis Mar 26, 2018
a12ba13
Added entry for AEM Remote Assets
HitmanInWis Mar 26, 2018
ff8d355
Remote assets code climate fixes
Apr 13, 2018
325c201
Remote assets code climate fixes
Apr 13, 2018
5f5d9cd
Updated setRenditionOnAsset to not suppress IOException - need to fla…
HitmanInWis Apr 16, 2018
67309c4
Merge remote-tracking branch 'upstream/master' into feature/aem-remot…
HitmanInWis Apr 16, 2018
8ba8e37
Merge remote-tracking branch 'upstream/master' into feature/aem-remot…
HitmanInWis Apr 24, 2018
4d0afd3
Code refactors per PR feedback
HitmanInWis Apr 24, 2018
996e011
Updated JSON parsing to Gson (away from deprecated sling JSON)
HitmanInWis Apr 24, 2018
961361d
Updated remote assets to use HttpClient "fluent" functions per PR fee…
HitmanInWis Apr 24, 2018
0d03df3
Fixed a bug with ignoring/removing renditions not found on remote ser…
HitmanInWis Apr 24, 2018
d254593
Updated everything to use resourceResolver instead of JCR interface t…
HitmanInWis Apr 24, 2018
7d410dc
Misc cleanups in docs
HitmanInWis Apr 24, 2018
b25aee2
Fixed bug where asset node sync was putting tags on jcr:content inste…
HitmanInWis May 1, 2018
4c6b3bc
Updated a second request for a asset currently being sync'd to wait f…
HitmanInWis May 1, 2018
9688d51
Fixed a bug with binary sync in remote assets where the resource reso…
HitmanInWis May 1, 2018
871f56b
Merge remote-tracking branch 'origin/master' into feature/aem-remote-…
HitmanInWis Jan 8, 2019
5ac2e7c
Update changelog for #1294 - New Remote Assets feature
HitmanInWis Jan 8, 2019
1052727
Merge remote-tracking branch 'origin/master' into feature/aem-remote-…
HitmanInWis Jan 8, 2019
d87fb07
Update AEM Remote Assets to OSGi annotations
HitmanInWis Jan 8, 2019
b46d361
Added unit tests for RemoteAssetsConfigImpl
HitmanInWis Jan 9, 2019
3d5d749
Merge remote-tracking branch 'origin/master' into feature/aem-remote-…
HitmanInWis Jan 9, 2019
cf5b04e
Cleanups from updating AEM Remote Assets to OSGi annotations
HitmanInWis Jan 9, 2019
78fdd96
Merge remote-tracking branch 'origin/master' into feature/aem-remote-…
HitmanInWis Jan 9, 2019
cd1af6e
Added unit tests for RemoteAssetDecorator
HitmanInWis Jan 11, 2019
f10faa5
Added unit tests for RemoteAssetsBinarySyncImpl
HitmanInWis Jan 14, 2019
2465f60
Added unit tests for RemoteAssetsNodeSyncImpl
HitmanInWis Jan 21, 2019
52db6a0
Refactored remoteassets test resources to remoteassetstest folder to …
HitmanInWis Jan 21, 2019
5d1ce2f
Refactored out calls to IOUtils that were not closing the streams
HitmanInWis Jan 21, 2019
f2ad45c
Resolved an issue where doing a full maven build would cause mockito …
HitmanInWis Jan 21, 2019
a644613
Update remote assets node sync to support tags at /content/cq:tags.
HitmanInWis Jan 21, 2019
0834d4f
Merge remote-tracking branch 'origin/master' into feature/aem-remote-…
HitmanInWis Jan 21, 2019
8c2cf8b
Fixed issue with log file getting too long from Remote Assets tests
HitmanInWis Jan 22, 2019
1b226be
Cleaned up a bunch of codestyle issues.
HitmanInWis Jan 22, 2019
75354c5
Fixed another codeclimate issue for Remote Assets.
HitmanInWis Jan 22, 2019
6c53241
Refactored getRemoteAssetPlaceholder to reduce Cognitive Complexity
HitmanInWis Jan 22, 2019
fbd1f1b
Renamed RemoteAssetsNodeSyncJob to RemoteAssetsNodeSyncScheduler to b…
HitmanInWis Jan 22, 2019
53ca155
Moved /content/cq:tags folder to /content/_cq_tags to work on Windows…
HitmanInWis Jan 22, 2019
d5be7df
Merge remote-tracking branch 'upstream/master' into feature/aem-remot…
HitmanInWis Feb 4, 2019
eb6292f
Merge remote-tracking branch 'origin/master' into feature/aem-remote-…
HitmanInWis Feb 13, 2019
3bca74c
Merge remote-tracking branch 'origin/master' into feature/aem-remote-…
HitmanInWis Mar 11, 2019
157c4ca
Update remote assets service user permissions to be added by EnsureSe…
HitmanInWis Mar 11, 2019
edad5d7
Fixed issue where RemoteAssetsNodeSyncScheduler was not successfully …
HitmanInWis Mar 11, 2019
7750c02
Update to CHANGELOG for remote assets
HitmanInWis Mar 11, 2019
924f145
Cleanup of Remote Asset config descriptions
HitmanInWis Mar 12, 2019
346a2da
Reduce some logging clutter at the DEBUG level.
HitmanInWis Mar 13, 2019
5f258c7
Reduce some logging clutter at the DEBUG level.
HitmanInWis Mar 13, 2019
98246c9
Merge remote-tracking branch 'upstream/master' into feature/aem-remot…
HitmanInWis Mar 21, 2019
51ba220
Ignore codeclimate test of switch case count for getRemoteAssetPlaceh…
HitmanInWis Mar 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com)
## [Unreleased]

### Added
- #1294 - New Remote Assets feature
- #1783 - Added the possibility to replace the existing host in an attribute

### Changed
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,337 @@
/*
* #%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%
*/

package com.adobe.acs.commons.assets;

/**
* File extension mime type constants that AEM supports.
* @see <a href="https://helpx.adobe.com/experience-manager/6-3/assets/using/assets-formats.html">Assets Supported Formats</a>
*/
public final class FileExtensionMimeTypeConstants {

private FileExtensionMimeTypeConstants() {
// Do nothing.
}

/**
* .image mime type constant.
*/
public static final String EXT_IMAGE = "image/s7asset";

/**
* .3g2 mime type constant.
*/
public static final String EXT_3G2 = "video/3gpp2";

/**
* .3gp mime type constant.
*/
public static final String EXT_3GP = "video/3gpp";

/**
* .aac mime type constant.
*/
public static final String EXT_AAC = "audio/x-aac";

/**
* .afm mime type constant.
*/
public static final String EXT_AFM = "application/x-font-type1";

/**
* .aiff mime type constant.
*/
public static final String EXT_AIFF = "audio/x-aiff";

/**
* .avi mime type constant.
*/
public static final String EXT_AVI = "video/x-msvideo";

/**
* .bmp mime type constant.
*/
public static final String EXT_BMP = "image/bmp";

/**
* .css mime type constant.
*/
public static final String EXT_CSS = "text/css";

/**
* .doc mime type constant.
*/
public static final String EXT_DOC = "application/msword";

/**
* .docx mime type constant.
*/
public static final String EXT_DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";

/**
* .ai, .eps and .ps mime type constant.
*/
public static final String EXT_AI_EPS_PS = "application/postscript";

/**
* .eps #1 mime type constant.
*/
public static final String EXT_EPS_1 = "application/eps";

/**
* .eps #2 mime type constant.
*/
public static final String EXT_EPS_2 = "application/x-eps";

/**
* .eps image #1 mime type constant.
*/
public static final String EXT_EPS_IMAGE_1 = "image/eps";

/**
* .eps image #2 mime type constant.
*/
public static final String EXT_EPS_IMAGE_2 = "image/x-eps";

/**
* .epub mime type constant.
*/
public static final String EXT_EPUB = "application/epub+zip";

/**
* .f4v mime type constant.
*/
public static final String EXT_F4V = "video/x-f4v";

/**
* .fla and .swf mime type constant.
*/
public static final String EXT_FLA_SWF = "application/x-shockwave-flash";

/**
* .flv mime type constant.
*/
public static final String EXT_FLV = "video/x-flv";

/**
* .fpx mime type constant.
*/
public static final String EXT_FPX = "image/vnd.fpx";

/**
* .gif mime type constant.
*/
public static final String EXT_GIF = "image/gif";

/**
* .html mime type constant.
*/
public static final String EXT_HTML = "text/html";

/**
* .icc and .icm mime type constant.
*/
public static final String EXT_ICC_ICM = "application/vnd.iccprofile";

/**
* .indd mime type constant.
*/
public static final String EXT_INDD = "application/x-indesign";

/**
* .jar mime type constant.
*/
public static final String EXT_JAR = "application/java-archive";

/**
* .jpeg and .jpg mime type constant.
*/
public static final String EXT_JPEG_JPG = "image/jpeg";

/**
* .m2v, .mpeg and .mpg mime type constant.
*/
public static final String EXT_M2V_MPEG_MPG = "video/mpeg";

/**
* .m4v mime type constant.
*/
public static final String EXT_M4V = "video/x-m4v";

/**
* .midi mime type constant.
*/
public static final String EXT_MIDI = "audio/midi";

/**
* .mov mime type constant.
*/
public static final String EXT_MOV = "video/quicktime";

/**
* .mp3 mime type constant.
*/
public static final String EXT_MP3 = "audio/mpeg";

/**
* .mp4 mime type constant.
*/
public static final String EXT_MP4 = "video/mp4";

/**
* .mts mime type constant.
*/
public static final String EXT_MTS = "model/vnd.mts";

/**
* .ogg mime type constant.
*/
public static final String EXT_OGG = "audio/ogg";

/**
* .ogv mime type constant.
*/
public static final String EXT_OGV = "video/ogg";

/**
* .otf mime type constant.
*/
public static final String EXT_OTF = "application/x-font-otf";

/**
* .pdf mime type constant.
*/
public static final String EXT_PDF = "application/pdf";

/**
* .pfb and .pfm mime type constant.
*/
public static final String EXT_PFB_PFM = "application/x-font-type1";

/**
* .pict mime type constant.
*/
public static final String EXT_PICT = "image/x-pict";

/**
* .png mime type constant.
*/
public static final String EXT_PNG = "image/png";

/**
* .ppt mime type constant.
*/
public static final String EXT_PPT = "application/vnd.ms-powerpoint";

/**
* .pptx mime type constant.
*/
public static final String EXT_PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation";

/**
* .psd mime type constant.
*/
public static final String EXT_PSD = "image/vnd.adobe.photoshop";

/**
* .rar mime type constant.
*/
public static final String EXT_RAR = "application/x-rar-compressed";

/**
* .rtf mime type constant.
*/
public static final String EXT_RTF = "application/rtf";

/**
* .svg mime type constant.
*/
public static final String EXT_SVG = "image/svg+xml";

/**
* .tar mime type constant.
*/
public static final String EXT_TAR = "application/x-tar";

/**
* .tif and .tiff mime type constant.
*/
public static final String EXT_TIF_TIFF = "image/tiff";

/**
* .ttc and .ttf mime type constant.
*/
public static final String EXT_TTC_TTF = "application/x-font-ttf";

/**
* .txt mime type constant.
*/
public static final String EXT_TXT = "text/plain";

/**
* .vob mime type constant.
*/
public static final String EXT_VOB = "video/dvd";

/**
* .vtt mime type constant.
*/
public static final String EXT_VTT = "text/vtt";

/**
* .wav mime type constant.
*/
public static final String EXT_WAV = "audio/x-wav";

/**
* .webm mime type constant.
*/
public static final String EXT_WEBM = "video/webm";

/**
* .wma mime type constant.
*/
public static final String EXT_WMA = "audio/x-ms-wma";

/**
* .wmv mime type constant.
*/
public static final String EXT_WMV = "video/x-ms-wmv";

/**
* .xls mime type constant.
*/
public static final String EXT_XLS = "application/vnd.ms-excel";

/**
* .xlsx mime type constant.
*/
public static final String EXT_XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";

/**
* .xml mime type constant.
*/
public static final String EXT_XML = "application/xml";

/**
* .zip mime type constant.
*/
public static final String EXT_ZIP = "application/zip";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* #%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%
*/
package com.adobe.acs.commons.remoteassets;

import org.apache.sling.api.resource.Resource;

/**
* Service for synchronizing a remote asset's binaries a from remote server.
*/
public interface RemoteAssetsBinarySync {

/**
* Sync an asset's binaries from a remote server.
* All binaries (original + renditions) are sync'd.
* @param resource Resource representing a dam:AssetContent
* @return boolean true if sync successful, else false
*/
boolean syncAsset(Resource resource);
}
Loading