07-29-2019 11:52 PM
07-30-2019 12:51 AM
Hi,
You can use the 'SiteService' (Java API) to get noderef and other detalis of site by site's shortName as below:
SiteInfo site = serviceRegistry.getSiteService().getSite("test");
NodeRef siteNode = site.getNodeRef();
This Link provides more information to you about siteServices.
As well as you can use Javascript API for getting noderef of site
var site = siteService.getSite("jncasr");
var siteNodeRef = site.getNode().getNodeRef();
Regards,
Vidhi
07-30-2019 12:51 AM
Hi,
You can use the 'SiteService' (Java API) to get noderef and other detalis of site by site's shortName as below:
SiteInfo site = serviceRegistry.getSiteService().getSite("test");
NodeRef siteNode = site.getNodeRef();
This Link provides more information to you about siteServices.
As well as you can use Javascript API for getting noderef of site
var site = siteService.getSite("jncasr");
var siteNodeRef = site.getNode().getNodeRef();
Regards,
Vidhi
07-28-2020 11:40 PM
serviceRegistry does not have "getSiteService()" methode.
can you please let me know exact way ?
07-29-2020 03:57 AM
ServiceRegistery does have proxy for SiteService.
Which version of ACS you are on?
You have option to inject siteService via spring bean as well. Example of a bean def:
<bean id="example.action" class="com.example.TestAction" parent="action-executer"> <constructor-arg ref="SiteService" /> <!-- proxy SiteService --> </bean>
or
<bean id="example.action" class="com.example.TestAction" parent="action-executer">
<constructor-arg ref="siteService" />
</bean> or <bean id="example.action" class="com.example.TestAction" parent="action-executer"> <property name="siteService" ref="SiteService" /> <!-- proxy SiteService --> </bean>
or
<bean id="example.action" class="com.example.TestAction" parent="action-executer">
<property name="siteService" ref="siteService" />
</bean>
Explore our Alfresco products with the links below. Use labels to filter content by product module.