Is there any web url for this?
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
ContCentric
serviceRegistry does not have "getSiteService()" methode.
can you please let me know exact way ?
ServiceRegistery does have proxy for SiteService.
https://github.com/Alfresco/alfresco-repository/blob/master/src/main/java/org/alfresco/service/ServiceRegistry.java#L411
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>