Merge pull request 'task_21388' (#2) from task_21388 into master
Reviewed-on: #2
This commit is contained in:
commit
b5effefc64
|
@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
|
||||||
|
## [v6.33.0-SNAPSHOT] - 2021-05-11
|
||||||
|
|
||||||
|
#### Enhancements
|
||||||
|
|
||||||
|
[#21388] Integrated with new workflow to interact with ws-thredds 1.x
|
||||||
|
[#21444] Moved to maven-portal-bom >= 3.6.2-SNAPSHOT
|
||||||
|
|
||||||
## [v6.32.0] - 2021-04-12
|
## [v6.32.0] - 2021-04-12
|
||||||
|
|
||||||
#### Enhancements
|
#### Enhancements
|
||||||
|
|
5
pom.xml
5
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>workspace-tree-widget</artifactId>
|
<artifactId>workspace-tree-widget</artifactId>
|
||||||
<version>6.32.0</version>
|
<version>6.33.0-SNAPSHOT</version>
|
||||||
<name>gCube Workspace Tree Widget</name>
|
<name>gCube Workspace Tree Widget</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>maven-portal-bom</artifactId>
|
<artifactId>maven-portal-bom</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>3.6.2-SNAPSHOT</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -65,7 +65,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.portal</groupId>
|
||||||
<artifactId>storagehub-icons-library</artifactId>
|
<artifactId>storagehub-icons-library</artifactId>
|
||||||
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
|
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -3,7 +3,6 @@ package org.gcube.portlets.user.workspace.client.model;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portal.wssynclibrary.shared.thredds.Sync_Status;
|
|
||||||
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
|
||||||
import org.gcube.portlets.user.workspace.client.interfaces.GXTCategorySmartFolder;
|
import org.gcube.portlets.user.workspace.client.interfaces.GXTCategorySmartFolder;
|
||||||
import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum;
|
import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum;
|
||||||
|
@ -16,13 +15,12 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
||||||
import com.google.gwt.user.client.ui.Image;
|
import com.google.gwt.user.client.ui.Image;
|
||||||
|
|
||||||
|
// TODO: Auto-generated Javadoc
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class FileModel.
|
* The Class FileModel.
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa{@literal @}isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa{@literal @}isti.cnr.it
|
||||||
* Sep 15, 2016
|
* Sep 15, 2016
|
||||||
*/
|
*/
|
||||||
public class FileModel extends BaseModelData implements Serializable, IsSerializable {
|
public class FileModel extends BaseModelData implements Serializable, IsSerializable {
|
||||||
|
|
||||||
|
@ -31,8 +29,8 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
protected GXTFolderItemTypeEnum folderItemType; //It's here to serialization don't remove
|
protected GXTFolderItemTypeEnum folderItemType; // It's here to serialization don't remove
|
||||||
protected GXTCategorySmartFolder smartFolders; //It's here to serialization don't remove
|
protected GXTCategorySmartFolder smartFolders; // It's here to serialization don't remove
|
||||||
protected InfoContactModel infoContacts;
|
protected InfoContactModel infoContacts;
|
||||||
protected boolean isRoot = false;
|
protected boolean isRoot = false;
|
||||||
protected boolean isVreFolder;
|
protected boolean isVreFolder;
|
||||||
|
@ -55,23 +53,23 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
public static final String OWNERFULLNAME = "Owner Name";
|
public static final String OWNERFULLNAME = "Owner Name";
|
||||||
public static final String HUMAN_REDABLE_CATEGORY = "HR Category";
|
public static final String HUMAN_REDABLE_CATEGORY = "HR Category";
|
||||||
|
|
||||||
//Thredds Synch status
|
// Synched with thredds
|
||||||
private Sync_Status synchedThreddsStatus;
|
private Boolean synchedWithWsThredds = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new file model.
|
* Instantiates a new file model.
|
||||||
*/
|
*/
|
||||||
protected FileModel(){
|
protected FileModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new file model.
|
* Instantiates a new file model.
|
||||||
*
|
*
|
||||||
* @param identifier the identifier
|
* @param identifier the identifier
|
||||||
* @param name the name
|
* @param name the name
|
||||||
* @param parent the parent
|
* @param parent the parent
|
||||||
* @param isDirectory the is directory
|
* @param isDirectory the is directory
|
||||||
* @param isShared the is shared
|
* @param isShared the is shared
|
||||||
*/
|
*/
|
||||||
public FileModel(String identifier, String name, FileModel parent, boolean isDirectory, boolean isShared) {
|
public FileModel(String identifier, String name, FileModel parent, boolean isDirectory, boolean isShared) {
|
||||||
setIdentifier(identifier);
|
setIdentifier(identifier);
|
||||||
|
@ -85,8 +83,8 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
/**
|
/**
|
||||||
* USED FOR ATTACHMENTS AND FolderBulkCreator.
|
* USED FOR ATTACHMENTS AND FolderBulkCreator.
|
||||||
*
|
*
|
||||||
* @param identifier the identifier
|
* @param identifier the identifier
|
||||||
* @param name the name
|
* @param name the name
|
||||||
* @param isDirectory the is directory
|
* @param isDirectory the is directory
|
||||||
*/
|
*/
|
||||||
public FileModel(String identifier, String name, boolean isDirectory) {
|
public FileModel(String identifier, String name, boolean isDirectory) {
|
||||||
|
@ -99,7 +97,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
/**
|
/**
|
||||||
* Inits the default properties.
|
* Inits the default properties.
|
||||||
*/
|
*/
|
||||||
protected void initDefaultProperties(){
|
protected void initDefaultProperties() {
|
||||||
setShortcutCategory(GXTCategorySmartFolder.SMF_UNKNOWN);
|
setShortcutCategory(GXTCategorySmartFolder.SMF_UNKNOWN);
|
||||||
setShareable(true);
|
setShareable(true);
|
||||||
}
|
}
|
||||||
|
@ -110,7 +108,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
* @param bool the new shareable
|
* @param bool the new shareable
|
||||||
*/
|
*/
|
||||||
public void setShareable(boolean bool) {
|
public void setShareable(boolean bool) {
|
||||||
set(ConstantsExplorer.ISSHAREABLE,bool);
|
set(ConstantsExplorer.ISSHAREABLE, bool);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +117,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @param description the new description
|
* @param description the new description
|
||||||
*/
|
*/
|
||||||
public void setDescription(String description){
|
public void setDescription(String description) {
|
||||||
set(ConstantsExplorer.DIRECTORYDESCRIPTION, description);
|
set(ConstantsExplorer.DIRECTORYDESCRIPTION, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +126,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return the description
|
* @return the description
|
||||||
*/
|
*/
|
||||||
public String getDescription(){
|
public String getDescription() {
|
||||||
return get(ConstantsExplorer.DIRECTORYDESCRIPTION);
|
return get(ConstantsExplorer.DIRECTORYDESCRIPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +137,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*/
|
*/
|
||||||
public boolean isShareable() {
|
public boolean isShareable() {
|
||||||
Object sharable = get(ConstantsExplorer.ISSHAREABLE);
|
Object sharable = get(ConstantsExplorer.ISSHAREABLE);
|
||||||
if(sharable!=null)
|
if (sharable != null)
|
||||||
return (Boolean) sharable;
|
return (Boolean) sharable;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -147,14 +145,15 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
/**
|
/**
|
||||||
* Instantiates a new file model.
|
* Instantiates a new file model.
|
||||||
*
|
*
|
||||||
* @param identifier the identifier
|
* @param identifier the identifier
|
||||||
* @param name the name
|
* @param name the name
|
||||||
* @param type the type
|
* @param type the type
|
||||||
* @param folderItemTypeEnum the folder item type enum
|
* @param folderItemTypeEnum the folder item type enum
|
||||||
* @param isDirectory the is directory
|
* @param isDirectory the is directory
|
||||||
* @param isShared the is shared
|
* @param isShared the is shared
|
||||||
*/
|
*/
|
||||||
public FileModel(String identifier, String name, String type, GXTFolderItemTypeEnum folderItemTypeEnum, boolean isDirectory, boolean isShared) {
|
public FileModel(String identifier, String name, String type, GXTFolderItemTypeEnum folderItemTypeEnum,
|
||||||
|
boolean isDirectory, boolean isShared) {
|
||||||
setIdentifier(identifier);
|
setIdentifier(identifier);
|
||||||
setName(name);
|
setName(name);
|
||||||
setType(type);
|
setType(type);
|
||||||
|
@ -170,14 +169,12 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
* @param parent the new parent file model
|
* @param parent the new parent file model
|
||||||
*/
|
*/
|
||||||
public void setParentFileModel(FileModel parent) {
|
public void setParentFileModel(FileModel parent) {
|
||||||
set(PARENT,parent);
|
set(PARENT, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status values
|
* Status values ConstantsExplorer.FOLDERNOTLOAD = "notload";
|
||||||
* ConstantsExplorer.FOLDERNOTLOAD = "notload";
|
* ConstantsExplorer.FOLDERLOADED = "loaded";
|
||||||
* ConstantsExplorer.FOLDERLOADED = "loaded";
|
|
||||||
*
|
*
|
||||||
* @param status the new status
|
* @param status the new status
|
||||||
*/
|
*/
|
||||||
|
@ -192,9 +189,9 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
|
|
||||||
Image icon = (Image) get(ICON);
|
Image icon = (Image) get(ICON);
|
||||||
AbstractImagePrototype iconAbs;
|
AbstractImagePrototype iconAbs;
|
||||||
if(icon==null){
|
if (icon == null) {
|
||||||
iconAbs = getAbstractPrototypeIcon();
|
iconAbs = getAbstractPrototypeIcon();
|
||||||
}else
|
} else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
set(ICON, iconAbs.createImage());
|
set(ICON, iconAbs.createImage());
|
||||||
|
@ -206,7 +203,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @param fullName the new owner full name
|
* @param fullName the new owner full name
|
||||||
*/
|
*/
|
||||||
public void setOwnerFullName(String fullName){
|
public void setOwnerFullName(String fullName) {
|
||||||
set(FileModel.OWNERFULLNAME, fullName);
|
set(FileModel.OWNERFULLNAME, fullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,17 +212,17 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return the owner full name
|
* @return the owner full name
|
||||||
*/
|
*/
|
||||||
public String getOwnerFullName(){
|
public String getOwnerFullName() {
|
||||||
return get(FileModel.OWNERFULLNAME);
|
return get(FileModel.OWNERFULLNAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the sharing value.
|
* Sets the sharing value.
|
||||||
*
|
*
|
||||||
* @param isShared the is shared
|
* @param isShared the is shared
|
||||||
* @param listShareUsers the list share users
|
* @param listShareUsers the list share users
|
||||||
*/
|
*/
|
||||||
public void setSharingValue(boolean isShared, List<InfoContactModel> listShareUsers){
|
public void setSharingValue(boolean isShared, List<InfoContactModel> listShareUsers) {
|
||||||
set(ISSHARED, isShared);
|
set(ISSHARED, isShared);
|
||||||
set(SHAREUSERS, listShareUsers);
|
set(SHAREUSERS, listShareUsers);
|
||||||
}
|
}
|
||||||
|
@ -236,7 +233,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
* @return the list user sharing
|
* @return the list user sharing
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<InfoContactModel> getListUserSharing(){
|
public List<InfoContactModel> getListUserSharing() {
|
||||||
return (List<InfoContactModel>) get(SHAREUSERS);
|
return (List<InfoContactModel>) get(SHAREUSERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +242,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @param listShareUsers the new list share user
|
* @param listShareUsers the new list share user
|
||||||
*/
|
*/
|
||||||
public void setListShareUser(List<InfoContactModel> listShareUsers){
|
public void setListShareUser(List<InfoContactModel> listShareUsers) {
|
||||||
set(SHAREUSERS, listShareUsers);
|
set(SHAREUSERS, listShareUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,9 +251,9 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return true, if is shared
|
* @return true, if is shared
|
||||||
*/
|
*/
|
||||||
public boolean isShared(){
|
public boolean isShared() {
|
||||||
Object shared = get(ISSHARED);
|
Object shared = get(ISSHARED);
|
||||||
if(shared!=null)
|
if (shared != null)
|
||||||
return (Boolean) shared;
|
return (Boolean) shared;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -266,7 +263,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return true, if is root
|
* @return true, if is root
|
||||||
*/
|
*/
|
||||||
public boolean isRoot(){
|
public boolean isRoot() {
|
||||||
return isRoot;
|
return isRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,11 +272,10 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @param isRoot the new checks if is root
|
* @param isRoot the new checks if is root
|
||||||
*/
|
*/
|
||||||
public void setIsRoot(boolean isRoot){
|
public void setIsRoot(boolean isRoot) {
|
||||||
this.isRoot = isRoot;
|
this.isRoot = isRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the icon.
|
* Gets the icon.
|
||||||
*
|
*
|
||||||
|
@ -296,61 +292,56 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*/
|
*/
|
||||||
public AbstractImagePrototype getAbstractPrototypeIcon() {
|
public AbstractImagePrototype getAbstractPrototypeIcon() {
|
||||||
|
|
||||||
GWT.log("My prop: "+this.toString());
|
GWT.log("My prop: " + this.toString());
|
||||||
|
|
||||||
AbstractImagePrototype absImgPr = Resources.getIconTable();
|
AbstractImagePrototype absImgPr = Resources.getIconTable();
|
||||||
|
|
||||||
if (!this.isDirectory()) { //IS FILE
|
if (!this.isDirectory()) { // IS FILE
|
||||||
if(this.getType()!=null)
|
if (this.getType() != null)
|
||||||
absImgPr = Resources.getIconByType(this.getName(), this.getType());
|
absImgPr = Resources.getIconByType(this.getName(), this.getType());
|
||||||
else
|
else
|
||||||
absImgPr = Resources.getIconByFolderItemType(this.getGXTFolderItemType());
|
absImgPr = Resources.getIconByFolderItemType(this.getGXTFolderItemType());
|
||||||
|
|
||||||
}else if(this.isShared()){ //IS A SHARED FOLDER?
|
} else if (this.isShared()) { // IS A SHARED FOLDER?
|
||||||
|
|
||||||
//GWT.log("setting icon "+this.getName()+" is shared: "+this.isShared() + ", this.isVreFolder() "+this.isVreFolder() +", this.isShareable() "+this.isShareable());
|
// GWT.log("setting icon "+this.getName()+" is shared: "+this.isShared() + ",
|
||||||
|
// this.isVreFolder() "+this.isVreFolder() +", this.isShareable()
|
||||||
|
// "+this.isShareable());
|
||||||
|
|
||||||
if(this.isVreFolder())
|
if (this.isVreFolder())
|
||||||
absImgPr = Resources.getIconVREFolder();
|
absImgPr = Resources.getIconVREFolder();
|
||||||
else{
|
else {
|
||||||
if(this.isShareable()){ //IS ROOT SHARED FOLDER
|
if (this.isShareable()) { // IS ROOT SHARED FOLDER
|
||||||
if(this.isPublic()) //IS PLUBIC
|
if (this.isPublic()) // IS PLUBIC
|
||||||
absImgPr = Resources.getIconFolderSharedPublic();
|
absImgPr = Resources.getIconFolderSharedPublic();
|
||||||
else
|
else
|
||||||
absImgPr = Resources.getIconSharedFolder();
|
absImgPr = Resources.getIconSharedFolder();
|
||||||
}else{ //IS A DESCENDANT
|
} else { // IS A DESCENDANT
|
||||||
if(this.isPublic()) //IS PLUBIC
|
if (this.isPublic()) // IS PLUBIC
|
||||||
absImgPr = Resources.getIconFolderPublic();
|
absImgPr = Resources.getIconFolderPublic();
|
||||||
else
|
else
|
||||||
absImgPr = Resources.getIconSharedFolder(); //IS A SHARED FOLDER DESCENDANT OF ROOT SHARED FOLDER
|
absImgPr = Resources.getIconSharedFolder(); // IS A SHARED FOLDER DESCENDANT OF ROOT SHARED
|
||||||
|
// FOLDER
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(this.getStatus() == ConstantsExplorer.FOLDERNOTLOAD){ //IS A FOLDER IN LOADING
|
} else if (this.getStatus() == ConstantsExplorer.FOLDERNOTLOAD) { // IS A FOLDER IN LOADING
|
||||||
absImgPr = Resources.getIconLoading2();
|
absImgPr = Resources.getIconLoading2();
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
//SPECIAL FOLDER?
|
// SPECIAL FOLDER?
|
||||||
if(this.isSpecialFolder())
|
if (this.isSpecialFolder())
|
||||||
absImgPr = Resources.getIconSpecialFolder();
|
absImgPr = Resources.getIconSpecialFolder();
|
||||||
else{ //SIMPLE FOLDER
|
else { // SIMPLE FOLDER
|
||||||
if(this.isPublic()) //IS PLUBIC
|
if (this.isPublic()) // IS PLUBIC
|
||||||
absImgPr = Resources.getIconFolderPublic();
|
absImgPr = Resources.getIconFolderPublic();
|
||||||
else {
|
else {
|
||||||
if(this.getSynchedThreddsStatus()!=null) {
|
if (this.getSynchedWithWsThredds() != null) {
|
||||||
switch(this.getSynchedThreddsStatus()) {
|
if(this.getSynchedWithWsThredds()) {
|
||||||
case OUTDATED_REMOTE:
|
absImgPr = Resources.getIconSynchedFolder();
|
||||||
absImgPr = Resources.getIconSyncTo();
|
|
||||||
break;
|
|
||||||
case OUTDATED_WS:
|
|
||||||
absImgPr = Resources.getIconSyncFrom();
|
|
||||||
break;
|
|
||||||
case UP_TO_DATE:
|
|
||||||
absImgPr = Resources.getIconSynched();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}else
|
} else
|
||||||
absImgPr = Resources.getIconFolder();
|
absImgPr = Resources.getIconFolder();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -358,7 +349,6 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
return absImgPr;
|
return absImgPr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the status.
|
* Gets the status.
|
||||||
*
|
*
|
||||||
|
@ -368,13 +358,12 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
return get("status");
|
return get("status");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the checks if is directory.
|
* Sets the checks if is directory.
|
||||||
*
|
*
|
||||||
* @param flag the new checks if is directory
|
* @param flag the new checks if is directory
|
||||||
*/
|
*/
|
||||||
public void setIsDirectory(boolean flag){
|
public void setIsDirectory(boolean flag) {
|
||||||
set(ISDIRECTORY, flag);
|
set(ISDIRECTORY, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +381,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return the identifier
|
* @return the identifier
|
||||||
*/
|
*/
|
||||||
public String getIdentifier(){
|
public String getIdentifier() {
|
||||||
return get(IDENTIFIER);
|
return get(IDENTIFIER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,21 +392,19 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*/
|
*/
|
||||||
public void setShortcutCategory(GXTCategorySmartFolder smfDocuments) {
|
public void setShortcutCategory(GXTCategorySmartFolder smfDocuments) {
|
||||||
set(SHORTCUTCATEGORY, smfDocuments);
|
set(SHORTCUTCATEGORY, smfDocuments);
|
||||||
if(smfDocuments!=null)
|
if (smfDocuments != null)
|
||||||
set(HUMAN_REDABLE_CATEGORY, smfDocuments.getValue());
|
set(HUMAN_REDABLE_CATEGORY, smfDocuments.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the shortcut category.
|
* Gets the shortcut category.
|
||||||
*
|
*
|
||||||
* @return the shortcut category
|
* @return the shortcut category
|
||||||
*/
|
*/
|
||||||
public GXTCategorySmartFolder getShortcutCategory(){
|
public GXTCategorySmartFolder getShortcutCategory() {
|
||||||
return (GXTCategorySmartFolder) get(SHORTCUTCATEGORY);
|
return (GXTCategorySmartFolder) get(SHORTCUTCATEGORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the name.
|
* Sets the name.
|
||||||
*
|
*
|
||||||
|
@ -441,7 +428,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return the parent file model
|
* @return the parent file model
|
||||||
*/
|
*/
|
||||||
public FileModel getParentFileModel(){
|
public FileModel getParentFileModel() {
|
||||||
return (FileModel) get(PARENT);
|
return (FileModel) get(PARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,14 +437,16 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return true, if is directory
|
* @return true, if is directory
|
||||||
*/
|
*/
|
||||||
public boolean isDirectory(){
|
public boolean isDirectory() {
|
||||||
Object directory = get(ISDIRECTORY);
|
Object directory = get(ISDIRECTORY);
|
||||||
if(directory!=null)
|
if (directory != null)
|
||||||
return (Boolean) directory;
|
return (Boolean) directory;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
* @see java.lang.Object#equals(java.lang.Object)
|
* @see java.lang.Object#equals(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
|
@ -489,7 +478,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @param type the new type
|
* @param type the new type
|
||||||
*/
|
*/
|
||||||
public void setType(String type){
|
public void setType(String type) {
|
||||||
set(TYPE, type);
|
set(TYPE, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,7 +487,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return the type
|
* @return the type
|
||||||
*/
|
*/
|
||||||
public String getType(){
|
public String getType() {
|
||||||
return get(TYPE);
|
return get(TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -507,7 +496,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @param folderItemTypeEnum the new folder item type
|
* @param folderItemTypeEnum the new folder item type
|
||||||
*/
|
*/
|
||||||
public void setFolderItemType(GXTFolderItemTypeEnum folderItemTypeEnum){
|
public void setFolderItemType(GXTFolderItemTypeEnum folderItemTypeEnum) {
|
||||||
set(FOLDERITEMTYPE, folderItemTypeEnum);
|
set(FOLDERITEMTYPE, folderItemTypeEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,7 +505,7 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return the GXT folder item type
|
* @return the GXT folder item type
|
||||||
*/
|
*/
|
||||||
public GXTFolderItemTypeEnum getGXTFolderItemType(){
|
public GXTFolderItemTypeEnum getGXTFolderItemType() {
|
||||||
return (GXTFolderItemTypeEnum) get(FOLDERITEMTYPE);
|
return (GXTFolderItemTypeEnum) get(FOLDERITEMTYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,21 +560,31 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
*
|
*
|
||||||
* @return true, if is public
|
* @return true, if is public
|
||||||
*/
|
*/
|
||||||
public boolean isPublic(){
|
public boolean isPublic() {
|
||||||
return isPublic;
|
return isPublic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSyncThreddsStatus(Sync_Status status) {
|
/**
|
||||||
this.synchedThreddsStatus = status;
|
* Sets the synched with ws thredds.
|
||||||
|
*
|
||||||
|
* @param bool the new synched with ws thredds
|
||||||
|
*/
|
||||||
|
public void setSynchedWithWsThredds(Boolean bool) {
|
||||||
|
this.synchedWithWsThredds = bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Sync_Status getSynchedThreddsStatus() {
|
/**
|
||||||
return synchedThreddsStatus;
|
* Gets the synched with ws thredds.
|
||||||
|
*
|
||||||
|
* @return the synched with ws thredds
|
||||||
|
*/
|
||||||
|
public Boolean getSynchedWithWsThredds() {
|
||||||
|
return synchedWithWsThredds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
/* (non-Javadoc)
|
*
|
||||||
* @see java.lang.Object#toString()
|
* @see java.lang.Object#toString()
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
|
@ -620,5 +619,4 @@ public class FileModel extends BaseModelData implements Serializable, IsSerializ
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,11 +412,14 @@ public interface Icons extends ClientBundle {
|
||||||
@Source("icons/sync-icon-to.png")
|
@Source("icons/sync-icon-to.png")
|
||||||
ImageResource syncIconTo();
|
ImageResource syncIconTo();
|
||||||
|
|
||||||
@Source("icons/sync-icon-from.png")
|
@Source("icons/folder_sync.png")
|
||||||
ImageResource syncIconFrom();
|
ImageResource synchedFolder();
|
||||||
|
|
||||||
@Source("icons/sync-icon-synched.png")
|
// @Source("icons/sync-icon-from.png")
|
||||||
ImageResource syncIconSynched();
|
// ImageResource syncIconFrom();
|
||||||
|
//
|
||||||
|
// @Source("icons/sync-icon-synched.png")
|
||||||
|
// ImageResource syncIconSynched();
|
||||||
|
|
||||||
@Source("icons/no-preview-available.png")
|
@Source("icons/no-preview-available.png")
|
||||||
ImageResource previewNotAvailable();
|
ImageResource previewNotAvailable();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 667 B |
Binary file not shown.
After Width: | Height: | Size: 625 B |
Binary file not shown.
After Width: | Height: | Size: 660 B |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -114,11 +114,11 @@ public class DialogGetInfo extends Dialog {
|
||||||
txtIsPublic.setValue(fileModel.isPublic() + "");
|
txtIsPublic.setValue(fileModel.isPublic() + "");
|
||||||
add(txtIsPublic);
|
add(txtIsPublic);
|
||||||
|
|
||||||
if (fileModel.getSynchedThreddsStatus() != null) {
|
if (fileModel.getSynchedWithWsThredds() != null) {
|
||||||
txtThreddsSynched = new TextField<String>();
|
txtThreddsSynched = new TextField<String>();
|
||||||
txtThreddsSynched.setFieldLabel("Thredds Sync");
|
txtThreddsSynched.setFieldLabel("Synched with Thredds");
|
||||||
txtThreddsSynched.setReadOnly(true);
|
txtThreddsSynched.setReadOnly(true);
|
||||||
txtThreddsSynched.setValue(fileModel.getSynchedThreddsStatus() + "");
|
txtThreddsSynched.setValue(fileModel.getSynchedWithWsThredds() + "");
|
||||||
add(txtThreddsSynched);
|
add(txtThreddsSynched);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -295,10 +295,15 @@ public class DialogGetInfoBootstrap extends Composite {
|
||||||
cgTxtIsPublic.setVisible(true);
|
cgTxtIsPublic.setVisible(true);
|
||||||
htmlSetValue(txtIsPublic, fileModel.isPublic() + "");
|
htmlSetValue(txtIsPublic, fileModel.isPublic() + "");
|
||||||
|
|
||||||
if (fileModel.getSynchedThreddsStatus() != null) {
|
GWT.log("Is synched? "+fileModel.getSynchedWithWsThredds());
|
||||||
txtThreddsSynched.setVisible(true);
|
|
||||||
htmlSetValue(txtThreddsSynched, fileModel.getSynchedThreddsStatus() + "");
|
if (fileModel.getSynchedWithWsThredds() != null) {
|
||||||
txtThreddsSynched.setHTML(fileModel.getSynchedThreddsStatus() + "");
|
if (fileModel.getSynchedWithWsThredds()) {
|
||||||
|
cgThreddsSynched.setVisible(true);
|
||||||
|
//txtThreddsSynched.setVisible(true);
|
||||||
|
htmlSetValue(txtThreddsSynched, fileModel.getSynchedWithWsThredds() + "");
|
||||||
|
txtThreddsSynched.setHTML(fileModel.getSynchedWithWsThredds() + "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
<b:ControlGroup
|
<b:ControlGroup
|
||||||
addStyleNames="my-control-group-get-info"
|
addStyleNames="my-control-group-get-info"
|
||||||
ui:field="cgThreddsSynched" visible="false">
|
ui:field="cgThreddsSynched" visible="false">
|
||||||
<b:ControlLabel>Thredds Sync</b:ControlLabel>
|
<b:ControlLabel title="Synched with THREDDS">Synched</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls>
|
||||||
<g:HTML ui:field="txtThreddsSynched">
|
<g:HTML ui:field="txtThreddsSynched">
|
||||||
</g:HTML>
|
</g:HTML>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -63,9 +63,6 @@ public class ObjectStorageHubToWorkpaceMapper {
|
||||||
isVreFolder = sharedFolder.isVreFolder();
|
isVreFolder = sharedFolder.isVreFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FolderModel root = new FolderModel(workspaceRoot.getId(),workspaceRoot.getName(),null, true, workspaceRoot.isShared(), false, workspaceRoot.isPublic());
|
|
||||||
// root.setIsRoot(true);
|
|
||||||
|
|
||||||
FolderModel theFolder = new FolderModel(folder.getId(), folder.getName(), null, folder.isFolder(), folder.isShared(), isVreFolder, isPublicFolder);
|
FolderModel theFolder = new FolderModel(folder.getId(), folder.getName(), null, folder.isFolder(), folder.isShared(), isVreFolder, isPublicFolder);
|
||||||
theFolder.setIsRoot(folder.isRoot());
|
theFolder.setIsRoot(folder.isRoot());
|
||||||
return theFolder;
|
return theFolder;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue