Last active
December 13, 2021 14:29
-
-
Save stormworm29/72ada2568a547610b1b31514582f1ad8 to your computer and use it in GitHub Desktop.
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
package com.mysite.core.config; | |
import org.apache.sling.models.annotations.injectorspecific.OSGiService; | |
import javax.annotation.PostConstruct; | |
import org.apache.sling.api.resource.Resource; | |
import org.apache.sling.api.resource.ResourceResolver; | |
import org.apache.sling.models.annotations.Default; | |
import org.apache.sling.models.annotations.Model; | |
import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy; | |
import org.apache.sling.models.annotations.injectorspecific.OSGiService; | |
import org.apache.sling.models.annotations.injectorspecific.SlingObject; | |
import org.apache.sling.models.annotations.injectorspecific.ValueMapValue; | |
@Model(adaptables = Resource.class) | |
public class OSGIModel { | |
@OSGiService | |
private OSGIClient OsgiClient; | |
private String osgiConfig; | |
public void postConstruct() throws Exception { | |
this.osgiConfig = OsgiClient.execute(); | |
} | |
public String getOsgiconfig() { | |
return osgiConfig; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment