Comments (4)
I think just a isAuthor(..)
method would be overkill since we have slingSettingsService.getRunModes().contains("author")
If it was part of a broader Util full of handy tolls for out-of-HTTPRequest context, then it would be a different story.
(If im in the context of a HTTP Request I (almost) always want to use WCMMode rather than runmodes.)
from acs-aem-commons.
I could see this being useful if it was a static. That requires jumping through some hoops to get this value set in a static context. Probably an immediate component which sets the values on startup. Runmodes can't be changed at runtime, so this is OK to do once.
If so, I'd like to see
isAuthor()
isPublish()
isRunmode(String)
from acs-aem-commons.
@davidjgonzalez I thought WCMMode was never a good way to differentiate between being on author or publish. IIRC @justinedelson is a proponent of this.
@justinedelson are you talking about creating a OSGi component that sets the values on startup? I would love to do this, but, might (read will) need direction to get me started.
from acs-aem-commons.
@kaushalmall WCMModes don't differentiate between author and publish instances; but can differentiate between intended publish and author behaviors. Within HTTP Request scoped-behaviors (Components/Servlets/etc.) the idea of the author/publish runmode is (normally) just an abstraction around WCMMode types.
Creating hard in-code deps on Author or Publish make it more difficult to experience the behavior on Author as it would on Publish.
Runmodes typically play a role in changing backend behaviors (WF, Listeners, Jobs, etc.) that need to behave differently based on the tier.
Of course, as with anything there are exceptions.
IIRC @jayk is a proponent of WCMModes :P
from acs-aem-commons.
Related Issues (20)
- Package Garbage Collector does not find all packages to clean up in v6.3.4 HOT 1
- touchui-composite-multifield.js - isUndefined check not working as expected HOT 1
- Package Garbage Collector doesn't remove old snapshot packages
- Font Awesome Icons are not loading
- Invalid max-age header set from property HOT 2
- release 6.3.8 failed to install on cloud service HOT 1
- Remove usages of deprecated org.apache.sling.commons.json HOT 1
- MCP Report performance slow HOT 5
- OOTB users to CSV exports not working HOT 3
- ACS Commons Report Builder References Column component showing incorrect data
- MCP Overview page doesn't show any processes HOT 2
- ACS commons | Garbage collection scheduler failing HOT 1
- Allow usage of BundleDisabler and ComponentDisabler via factory configuration
- ACS composite multifield error prevents to load values in the nested fields on author dialog. HOT 1
- NullPointerException when trying to open dialog generated via @DialogProvider
- Remove JSR305 dependency
- Only JUnit5 tests executed by m-surefire-p HOT 3
- OSGi support for Java HTTP Client HOT 1
- Raise minimum required Java version to 11 HOT 3
- Content Sync - Version history not preserving from source to destination HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acs-aem-commons.