Is there any web url for this?
Solved! Go to Solution.
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
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
serviceRegistry does not have "getSiteService()" methode.
can you please let me know exact way ?
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>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.