Update after clarifying information:
Navigate to your overlayed siteadmin while bypassing the Vanity URL: http://localhost:4502/apps/wcm/core/content/siteadmin.html#/content/geometrixx. If you see the column here, it's an issue with the Vanity URL. Navigate to http://localhost:4502/crx/de/index.jsp#/apps/wcm/core/content/siteadmin and edit the sling:vanityOrder
value to 310
or anything greater than 300. At this point you should see the new column at http://localhost:4502/siteadmin.
The demo package from Package Share failed to do this. By using the demo package and updating this value, I was able to make this work on AEM 5.6.1 and AEM 6.2.
Original post:
If you follow the instructions on the documentation page that you linked to, Customizing the Websites Administration Console, everything will work. There is even a full example already built for you that can be downloaded from Package Share - the link is at the bottom of the page.
To answer your question, you don't have to call your code, that will be handled by AEM for you as long as you follow the instructions and satisfy these four main points:
- Your class implements
com.day.cq.commons.ListInfoProvider
- Your class is a service
@Service(value = ListInfoProvider.class)
- Your service is active
- You implement the documented methods
Such as:
@Component(metatype = false)
@Service(value = ListInfoProvider.class)
public class StarredListInfoProvider implements ListInfoProvider {
public void updateListGlobalInfo(SlingHttpServletRequest request, JSONObject info, Resource resource) throws JSONException {
}
public void updateListItemInfo(SlingHttpServletRequest request, JSONObject info, Resource resource) throws JSONException {
}
}
When your service becomes active it will be available to AEM. Verify the status of the service at your Apache Felix Components Console at http://localhost:4502/system/console/components.
Within AEM's core is a service that references the ListInfoProvider
interface. AEM is using the @Reference
SCR Annotation to bind OSGi services just like you do in your own services. See the Apache Felix SCR Annotations @Reference documentation. The reference in AEM's service defines multiple cardinality meaning that it will bind multiple services, meaning that you can define multiple new columns in the Siteadmin console.
The bottom line is AEM is taking advantage of Apache Felix to bind a reference to your service when it becomes available. It knows how to do that because you've implemented the interface that AEM is watching for. Once your service is active, you don't need to call or run anything.