本文整理汇总了Java中org.alfresco.service.cmr.site.SiteInfo.getTitle方法的典型用法代码示例。如果您正苦于以下问题:Java SiteInfo.getTitle方法的具体用法?Java SiteInfo.getTitle怎么用?Java SiteInfo.getTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.site.SiteInfo
的用法示例。
在下文中一共展示了SiteInfo.getTitle方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDisplayLabel
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
@Override
public FacetLabel getDisplayLabel(String value)
{
// Solr returns the site short name encoded
value = ISO9075.decode(value);
String title = null;
if (nonSiteLocationsLabels.containsKey(value))
{
title = nonSiteLocationsLabels.get(value);
}
else
{
SiteService siteService = serviceRegistry.getSiteService();
SiteInfo siteInfo = siteService.getSite(value);
title = siteInfo != null ? siteInfo.getTitle() : value;
}
return new FacetLabel(value, title, -1);
}
示例2: addSiteName
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
private void addSiteName(String siteId, Map<String, String> siteNames)
{
if (siteId == null)
{
return;
}
String siteName = siteNames.get(siteId);
if (siteName == null)
{
SiteInfo site = siteService.getSite(siteId);
if (site == null)
{
return;
}
String siteTitle = site.getTitle();
if (siteTitle != null && siteTitle.length() > 0)
{
siteName = siteTitle;
}
else
{
siteName = siteId;
}
siteNames.put(siteId, siteName);
}
}
示例3: getSiteName
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
protected String getSiteName(Map<String, String> properties)
{
String siteFullName = properties.get(getWorkflowPropForSiteName());
SiteInfo site = siteService.getSite(siteFullName);
if (site == null)
throw new InvitationException("The site " + siteFullName + " could not be found.");
String siteName = site.getShortName();
String siteTitle = site.getTitle();
if (siteTitle != null && siteTitle.length() > 0)
{
siteName = siteTitle;
}
return siteName;
}
示例4: generateWorkflowDescription
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
/**
* Generates a description for the workflow
*
* @param siteInfo The site to generate a description for
* @param messageId The resource bundle key to use for the description
* @return The workflow description
*/
protected String generateWorkflowDescription(SiteInfo siteInfo, String messageId)
{
String siteTitle = siteInfo.getTitle();
if (siteTitle == null || siteTitle.length() == 0)
{
siteTitle = siteInfo.getShortName();
}
Locale locale = (Locale) this.nodeService.getProperty(siteInfo.getNodeRef(), ContentModel.PROP_LOCALE);
return I18NUtil.getMessage(messageId, locale == null ? I18NUtil.getLocale() : locale, siteTitle);
}
示例5: addFavouriteSite
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
private PersonFavourite addFavouriteSite(String userName, NodeRef nodeRef)
{
PersonFavourite favourite = null;
SiteInfo siteInfo = siteService.getSite(nodeRef);
if(siteInfo != null)
{
favourite = getFavouriteSite(userName, siteInfo);
if(favourite == null)
{
Map<String, Serializable> preferences = new HashMap<String, Serializable>(1);
String siteFavouritedKey = siteFavouritedKey(siteInfo);
preferences.put(siteFavouritedKey, Boolean.TRUE);
// ISO8601 string format: PreferenceService works with strings only for dates it seems
String siteCreatedAtKey = siteCreatedAtKey(siteInfo);
Date createdAt = new Date();
String createdAtStr = ISO8601DateFormat.format(createdAt);
preferences.put(siteCreatedAtKey, createdAtStr);
preferenceService.setPreferences(userName, preferences);
favourite = new PersonFavourite(userName, siteInfo.getNodeRef(), Type.SITE, siteInfo.getTitle(), createdAt);
QName nodeClass = nodeService.getType(nodeRef);
OnAddFavouritePolicy policy = onAddFavouriteDelegate.get(nodeRef, nodeClass);
policy.onAddFavourite(userName, nodeRef);
}
}
else
{
// shouldn't happen, getType recognizes it as a site or subtype
logger.warn("Unable to get site for " + nodeRef);
}
return favourite;
}
示例6: getFavouriteSite
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
private PersonFavourite getFavouriteSite(String userName, SiteInfo siteInfo)
{
PersonFavourite favourite = null;
String siteFavouritedKey = siteFavouritedKey(siteInfo);
String siteCreatedAtKey = siteCreatedAtKey(siteInfo);
Boolean isFavourited = false;
Serializable s = preferenceService.getPreference(userName, siteFavouritedKey);
if(s != null)
{
if(s instanceof String)
{
isFavourited = Boolean.valueOf((String)s);
}
else if(s instanceof Boolean)
{
isFavourited = (Boolean)s;
}
else
{
throw new AlfrescoRuntimeException("Unexpected favourites preference value");
}
}
if(isFavourited)
{
String createdAtStr = (String)preferenceService.getPreference(userName, siteCreatedAtKey);
Date createdAt = (createdAtStr == null ? null : ISO8601DateFormat.parse(createdAtStr));
favourite = new PersonFavourite(userName, siteInfo.getNodeRef(), Type.SITE, siteInfo.getTitle(), createdAt);
}
return favourite;
}
示例7: SiteImpl
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
public SiteImpl(SiteInfo siteInfo, SiteRole siteRole, Boolean created)
{
this.siteId = siteInfo.getShortName();
this.description = siteInfo.getDescription();
this.title = siteInfo.getTitle();
this.visibility = siteInfo.getVisibility().toString();
this.created = created;
this.guid = siteInfo.getNodeRef().getId();
}
示例8: compare
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
@Override
public int compare(SiteMembership o1, SiteMembership o2)
{
String personId1 = o1.getPersonId();
String personId2 = o2.getPersonId();
SiteInfo siteInfo1 = o1.getSiteInfo();
SiteInfo siteInfo2 = o2.getSiteInfo();
String shortName1 = siteInfo1.getShortName();
String shortName2 = siteInfo2.getShortName();
String firstName1 = o1.getFirstName();
String firstName2 = o2.getFirstName();
String lastName1 = o1.getLastName();
String lastName2 = o2.getLastName();
String siteRole1 = o1.getRole();
String siteRole2 = o2.getRole();
String siteTitle1 = siteInfo1.getTitle();
String siteTitle2 = siteInfo2.getTitle();
int personId = safeCompare(personId1, personId2);
int firstName = safeCompare(firstName1, firstName2);
int siteShortName = safeCompare(shortName1, shortName2);
int lastName = safeCompare(lastName1, lastName2);
int siteRole = safeCompare(siteRole1, siteRole2);
int siteTitle = safeCompare(siteTitle1, siteTitle2);
if (siteRole == 0 && siteShortName == 0 && personId == 0)
{
// equals contract
return 0;
}
int ret = 0;
switch (comparatorType)
{
case SITES:
{
ret = compareSitesBody(shortName1, shortName2, siteRole1, siteRole2, siteTitle1, siteTitle2, siteShortName, siteRole, siteTitle, ret);
break;
}
case MEMBERS:
{
ret = compareMembersBody(personId1, personId2, lastName1, lastName2, siteRole1, siteRole2, personId, firstName, lastName, siteRole, ret);
break;
}
}
return ret;
}
示例9: TestSite
import org.alfresco.service.cmr.site.SiteInfo; //导入方法依赖的package包/类
public TestSite(TestNetwork account, SiteInfo siteInfo)
{
this(account, siteInfo.getShortName(), siteInfo.getNodeRef().getId(), siteInfo.getTitle(), siteInfo.getDescription(), siteInfo.getVisibility());
this.account = account;
this.siteInfo = siteInfo;
}