@Override
	public String buildShareSubject(Entity entity) {
		
		String entityKey = entity.getKey();
		String entityName = entity.getName();

		StringBuilder builder = new StringBuilder();
		SocializeSession session = getSocialize().getSession();
		
		User currentUser = null;
		
		if(session != null) {
			currentUser = session.getUser();
		}

		String sharingText = localizationService.getString(I18NConstants.SHARE_TEXT_SHARING);
		String sharedText = localizationService.getString(I18NConstants.SHARE_TEXT_SHARED);
		
		if(currentUser != null) {
			String name = currentUser.getDisplayName();
			if(StringUtils.isEmpty(name)) {
				builder.append(sharingText);
				builder.append(" ");
			}
			else {
				builder.append(name);
				builder.append(" ");
				builder.append(sharedText);
				builder.append(" ");
			}
		}
		else {
			builder.append(sharingText);
			builder.append(" ");
		}
		
		if(!StringUtils.isEmpty(entityName)) {
			builder.append(entityName);
		}
		else {
			builder.append(entityKey);
		}
		
		return builder.toString();
	}
@Override
	public String buildShareSubject(Entity entity) {
		
		String entityKey = entity.getKey();
		String entityName = entity.getName();

		StringBuilder builder = new StringBuilder();
		SocializeSession session = getSocialize().getSession();
		
		User currentUser = null;
		
		if(session != null) {
			currentUser = session.getUser();
		}

		String sharingText = localizationService.getString(I18NConstants.SHARE_TEXT_SHARING);
		String sharedText = localizationService.getString(I18NConstants.SHARE_TEXT_SHARED);
		
		if(currentUser != null) {
			String name = currentUser.getDisplayName();
			if(StringUtils.isEmpty(name)) {
				builder.append(sharingText);
				builder.append(" ");
			}
			else {
				builder.append(name);
				builder.append(" ");
				builder.append(sharedText);
				builder.append(" ");
			}
		}
		else {
			builder.append(sharingText);
			builder.append(" ");
		}
		
		if(!StringUtils.isEmpty(entityName)) {
			builder.append(entityName);
		}
		else {
			builder.append(entityKey);
		}
		
		return builder.toString();
	}
@ Override public String buildShareSubject ( Entity entity ) { String entityKey = entity . getKey ( ) ; String entityName = entity . getName ( ) ; StringBuilder builder = new StringBuilder ( ) ; SocializeSession session = getSocialize ( ) . getSession ( ) ; User currentUser = null ; if ( session != null ) { currentUser = session . getUser ( ) ; } String sharingText = localizationService . getString ( I18NConstants . SHARE_TEXT_SHARING ) ; String sharedText = localizationService . getString ( I18NConstants . SHARE_TEXT_SHARED ) ; if ( currentUser != null ) { String name = currentUser . getDisplayName ( ) ; if ( StringUtils . isEmpty ( name ) ) { builder . append ( sharingText ) ; builder . append ( " " ) ; } else { builder . append ( name ) ; builder . append ( " " ) ; builder . append ( sharedText ) ; builder . append ( " " ) ; } } else { builder . append ( sharingText ) ; builder . append ( " " ) ; } if ( ! StringUtils . isEmpty ( entityName ) ) { builder . append ( entityName ) ; } else { builder . append ( entityKey ) ; } return builder . toString ( ) ; }
/* (non-Javadoc)
@see com.socialize.api.ShareMessageBuilder#buildShareSubject(com.socialize.entity.Entity)
/ * ( non - Javadoc )