Skip to content

Commit

Permalink
Merge pull request #9 from gergina1/PB-874_Settings_modified_when_upd…
Browse files Browse the repository at this point in the history
…ating_package

PB-874. Settings modified when updating package through SDK.
  • Loading branch information
SeungChoi authored May 1, 2017
2 parents 4c9a29f + 7bc16d4 commit 5114861
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.silanis.esl.api.model;
//
import com.fasterxml.jackson.annotation.*;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.silanis.esl.api.util.SchemaSanitizer;
@JsonIgnoreProperties(ignoreUnknown=true)
public class TitleBarOptions extends Model
Expand All @@ -19,8 +18,8 @@ public class TitleBarOptions extends Model
public TitleBarOptions ( ) {}

// Fields
protected Boolean _progressBar = true;
protected Boolean _title = true;
protected Boolean _progressBar;
protected Boolean _title;

// Accessors

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.silanis.esl.sdk;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
Expand All @@ -10,21 +10,21 @@
*/
public class DocumentPackageAttributes {

private Map<String,Object> contents = new HashMap<String,Object>();
private Map<String,Object> contents = new LinkedHashMap<String, Object>();

public DocumentPackageAttributes() {
}

public void append( String name, Object value ) {
if (null == contents) {
contents = new HashMap<String,Object>();
contents = new LinkedHashMap<String, Object>();
}
contents.put(name, value);
}

public void append( DocumentPackageAttributes attributes ) {
if (null == contents) {
contents = new HashMap<String,Object>();
contents = new LinkedHashMap<String, Object>();
}
if(null != attributes && null != attributes.getContents()) {
contents.putAll(attributes.getContents());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class DocumentPackageSettings {
private List<String> declineReasons = new ArrayList<String>();
private List<String> optOutReasons = new ArrayList<String>();
private Integer maxAuthAttempts = null;
private Boolean showDocumentToolbarDownloadButton = true;
private Boolean showDocumentToolbarDownloadButton;
private Boolean showDialogOnComplete = null;
private Boolean showPackageOwnerInPerson = null;
private Boolean showLanguageDropDown = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DocumentPackageSettingsBuilder {
private List<String> declineReasons = new ArrayList<String>();
private List<String> optOutReasons = new ArrayList<String>();
private Integer maxAuthAttempts = null;
private Boolean showDocumentToolbarDownloadButton = true;
private Boolean showDocumentToolbarDownloadButton = null;
private Boolean showDialogOnComplete = null;
private Boolean showPackageOwnerInPerson = null;
private Boolean showLanguageDropDown = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,18 @@ public com.silanis.esl.api.model.LayoutOptions toAPILayoutOptions() {
return apiLayoutOptions;
}

TitleBarOptions titleBarOptions = new TitleBarOptions();
titleBarOptions.safeSetTitle( sdkCeremonyLayoutSettings.getShowTitle() );
titleBarOptions.safeSetProgressBar( sdkCeremonyLayoutSettings.getProgressBar() );

HeaderOptions headerOptions = new HeaderOptions();

if (sdkCeremonyLayoutSettings.getShowTitle() != null || sdkCeremonyLayoutSettings.getProgressBar() != null) {
TitleBarOptions titleBarOptions = new TitleBarOptions();
titleBarOptions.safeSetTitle(sdkCeremonyLayoutSettings.getShowTitle());
titleBarOptions.safeSetProgressBar(sdkCeremonyLayoutSettings.getProgressBar());
headerOptions.safeSetTitleBar(titleBarOptions);
}

headerOptions.safeSetBreadcrumbs( sdkCeremonyLayoutSettings.getBreadCrumbs() );
headerOptions.safeSetSessionBar( sdkCeremonyLayoutSettings.getSessionBar() );
headerOptions.safeSetGlobalNavigation( sdkCeremonyLayoutSettings.getGlobalNavigation() );
headerOptions.safeSetTitleBar( titleBarOptions );

GlobalActionsOptions globalActionsOptions = new GlobalActionsOptions();
globalActionsOptions.safeSetConfirm( sdkCeremonyLayoutSettings.getShowGlobalConfirmButton() );
Expand All @@ -72,7 +75,6 @@ public com.silanis.esl.api.model.LayoutOptions toAPILayoutOptions() {
com.silanis.esl.api.model.LayoutOptions result = new LayoutOptions();
result.safeSetIframe( sdkCeremonyLayoutSettings.getiFrame() );
result.safeSetNavigator( sdkCeremonyLayoutSettings.getNavigator() );
result.safeSetFooter( new FooterOptions() );
result.safeSetHeader( headerOptions );
result.safeSetBrandingBar( brandingBarOptions );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,6 @@ public void updatePackage( PackageId packageId, DocumentPackage sdkPackage ) thr
} catch (Exception e) {
throw new EslException("Could not update the package.", e);
}
// Update roles
List<Role> roleList = aPackage.getRoles();
for (Role role : roleList) {
updateRole(packageId, role);
}
}

/**
Expand Down

0 comments on commit 5114861

Please sign in to comment.