Add javadoc

Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
SirWayne
2016-04-15 17:47:02 +02:00
parent 536098c4c7
commit 2462c7b6bf
3 changed files with 21 additions and 2 deletions

View File

@@ -1,5 +1,10 @@
/**
* Copyright (c) 2011-2016 Bosch Software Innovations GmbH, Germany. All rights reserved.
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.ui.common;

View File

@@ -740,7 +740,7 @@ public class TargetTable extends AbstractTable<Target, TargetIdName> implements
.setValue(updatedTarget.getTargetInfo().getLastTargetQuery());
item.getItemProperty(SPUILabelDefinitions.VAR_LAST_MODIFIED_BY)
.setValue(UserDetailsFormatter.loadAndFormatCreatedBy(updatedTarget));
.setValue(UserDetailsFormatter.loadAndFormatLastModifiedBy(updatedTarget));
item.getItemProperty(SPUILabelDefinitions.VAR_LAST_MODIFIED_DATE)
.setValue(SPDateTimeUtil.getFormattedDate(updatedTarget.getLastModifiedAt()));
item.getItemProperty(SPUILabelDefinitions.VAR_DESC).setValue(updatedTarget.getDescription());

View File

@@ -86,6 +86,13 @@ public final class SPDateTimeUtil {
return formatDate(lastQueryDate, null);
}
/**
* Get formatted date 'created at' by entity.
*
* @param baseEntity
* the entity
* @return String formatted date
*/
public static String formatCreatedAt(final BaseEntity baseEntity) {
if (baseEntity == null) {
return StringUtils.EMPTY;
@@ -93,6 +100,13 @@ public final class SPDateTimeUtil {
return formatDate(baseEntity.getCreatedAt(), StringUtils.EMPTY);
}
/**
* Get formatted date 'last modefied at' by entity.
*
* @param baseEntity
* the entity
* @return String formatted date
*/
public static String formatLastModifiedAt(final BaseEntity baseEntity) {
if (baseEntity == null) {
return StringUtils.EMPTY;