Skip to content

Commit

Permalink
feat: zimlet code cleanup (#310)
Browse files Browse the repository at this point in the history
* chore: zimlet cleanup part1

* chore: zimlet cleanup part2

* chore: zimlet cleanup part3

* chore: zimlet cleanup part4 bring back stuff to fix UI issues

* chore: mark attributes deprecated

* chore: generate code

* chore: remove zimlet related properties

* chore: remove unused dependencies

rif: [CO-778]
  • Loading branch information
keshavbhatt authored Aug 31, 2023
1 parent 2a561b4 commit 8d8da00
Show file tree
Hide file tree
Showing 183 changed files with 5,825 additions and 16,747 deletions.
8 changes: 0 additions & 8 deletions carbonio-jetty-libs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@
<artifactId>jamm</artifactId>
<version>0.2.5</version>
</dependency>
<dependency>
<groupId>com.github.zafarkhaja</groupId>
<artifactId>java-semver</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down Expand Up @@ -222,10 +218,6 @@
<groupId>com.unboundid</groupId>
<artifactId>unboundid-ldapsdk</artifactId>
</dependency>
<dependency>
<groupId>com.yahoo.platform.yui</groupId>
<artifactId>yuicompressor</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions client/src/main/java/com/zimbra/client/ZGetInfoResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ public Map<String, List<String>> getAttrs() {
return MapUtil.multimapToMapOfLists(data.getAttrsMultimap());
}

public Map<String, List<String>> getZimletProps() {
return MapUtil.multimapToMapOfLists(
data.getPropsMultimap(ZAttrProvisioning.A_zimbraZimletUserProperties));
}

/***
*
* @return Set of all lowercased email addresses for this account, including primary name and any aliases.
Expand Down
2 changes: 1 addition & 1 deletion client/src/main/java/com/zimbra/client/ZMailbox.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public class ZMailbox implements ToZJSONObject, MailboxStore {

public static final String CONTACT_IMPORT_TYPE_CSV = "csv";

private static Set<InfoSection> NOT_ZIMLETS =
private static final Set<InfoSection> NOT_ZIMLETS =
Collections.unmodifiableSet(EnumSet.complementOf(EnumSet.of(InfoSection.zimlets)));

private ZAuthToken mAuthToken;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7132,7 +7132,8 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraFeatureManageSMIMECertificateEnabled = "zimbraFeatureManageSMIMECertificateEnabled";

/**
* enable end-user to manage zimlets
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: enable
* end-user to manage zimlets
*
* @since ZCS 6.0.2
*/
Expand Down Expand Up @@ -13489,6 +13490,7 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraPrefDeleteInviteOnReply = "zimbraPrefDeleteInviteOnReply";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* zimlets user does not want to see in the UI
*
* @since ZCS 6.0.5
Expand Down Expand Up @@ -14693,6 +14695,7 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraPrefWhenSentToEnabled = "zimbraPrefWhenSentToEnabled";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* zimlets user wants to see in the UI
*
* @since ZCS 6.0.0_BETA1
Expand All @@ -14701,6 +14704,7 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraPrefZimlets = "zimbraPrefZimlets";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* whether or not zimlet tree is expanded
*
* @since ZCS 5.0.5
Expand Down Expand Up @@ -17919,6 +17923,7 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraXMPPServerDialbackKey = "zimbraXMPPServerDialbackKey";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* ZimbraX compatible semantic version expression
*
* @since ZCS 8.8.9
Expand All @@ -17935,20 +17940,23 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraYahooId = "zimbraYahooId";

/**
* List of Zimlets available to this COS Values can be prefixed with ! or
* + or - !: mandatory + (or no prefix): enabled by default -: disabled
* by default
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: List
* of Zimlets available to this COS Values can be prefixed with ! or + or
* - !: mandatory + (or no prefix): enabled by default -: disabled by
* default
*/
@ZAttr(id=291)
public static final String A_zimbraZimletAvailableZimlets = "zimbraZimletAvailableZimlets";

/**
* The content object section in the Zimlet description
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: The
* content object section in the Zimlet description
*/
@ZAttr(id=288)
public static final String A_zimbraZimletContentObject = "zimbraZimletContentObject";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* whether zimlets that send sensitive data are disabled in
* &quot;mixed&quot; zimbraMailMode
*
Expand All @@ -17958,14 +17966,16 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraZimletDataSensitiveInMixedModeDisabled = "zimbraZimletDataSensitiveInMixedModeDisabled";

/**
* Zimlet description
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: Zimlet
* description
*/
@ZAttr(id=283)
public static final String A_zimbraZimletDescription = "zimbraZimletDescription";

/**
* List of Zimlets available to this domain. Zimlets available to
* accounts in the domain is the union of account/cos attribute
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: List
* of Zimlets available to this domain. Zimlets available to accounts in
* the domain is the union of account/cos attribute
* zimbraZimletAvailableZimlets and this attribute. See
* zimbraZimletAvailableZimlets for value format.
*
Expand All @@ -17975,36 +17985,42 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraZimletDomainAvailableZimlets = "zimbraZimletDomainAvailableZimlets";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* whether this Zimlet is enabled
*/
@ZAttr(id=301)
public static final String A_zimbraZimletEnabled = "zimbraZimletEnabled";

/**
* The handler class for server side Zimlet extension
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: The
* handler class for server side Zimlet extension
*/
@ZAttr(id=286)
public static final String A_zimbraZimletHandlerClass = "zimbraZimletHandlerClass";

/**
* The global config for the Zimlet
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: The
* global config for the Zimlet
*/
@ZAttr(id=287)
public static final String A_zimbraZimletHandlerConfig = "zimbraZimletHandlerConfig";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* Whether server side keyword indexing enabled
*/
@ZAttr(id=284)
public static final String A_zimbraZimletIndexingEnabled = "zimbraZimletIndexingEnabled";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* Whether this zimlet is an extension
*/
@ZAttr(id=304)
public static final String A_zimbraZimletIsExtension = "zimbraZimletIsExtension";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* Whether to enable JSP compilation for Zimlets (i.e. for /zimlet
* webapp)
*
Expand All @@ -18014,13 +18030,14 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraZimletJspEnabled = "zimbraZimletJspEnabled";

/**
* Server side object keyword used for indexing and search for this
* Zimlet
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: Server
* side object keyword used for indexing and search for this Zimlet
*/
@ZAttr(id=281)
public static final String A_zimbraZimletKeyword = "zimbraZimletKeyword";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* Whether to load zimlets synchronously in the web client. If set to
* TRUE, users are not allowed to use the core app before zimlets are
* loaded. If set to FALSE, zimlets are loaded in the background and
Expand All @@ -18033,50 +18050,58 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraZimletLoadSynchronously = "zimbraZimletLoadSynchronously";

/**
* The panel item section in the Zimlet description
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: The
* panel item section in the Zimlet description
*/
@ZAttr(id=289)
public static final String A_zimbraZimletPanelItem = "zimbraZimletPanelItem";

/**
* Object match priority
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: Object
* match priority
*/
@ZAttr(id=302)
public static final String A_zimbraZimletPriority = "zimbraZimletPriority";

/**
* URL of extra scripts used by the Zimlet
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: URL of
* extra scripts used by the Zimlet
*/
@ZAttr(id=290)
public static final String A_zimbraZimletScript = "zimbraZimletScript";

/**
* Regex of content object
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: Regex
* of content object
*/
@ZAttr(id=292)
public static final String A_zimbraZimletServerIndexRegex = "zimbraZimletServerIndexRegex";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* Whether store is matched for this type
*/
@ZAttr(id=285)
public static final String A_zimbraZimletStoreMatched = "zimbraZimletStoreMatched";

/**
* Zimlet target apps
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: Zimlet
* target apps
*
* @since ZCS 5.0.3
*/
@ZAttr(id=606)
public static final String A_zimbraZimletTarget = "zimbraZimletTarget";

/**
* User properties for Zimlets
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc: User
* properties for Zimlets
*/
@ZAttr(id=296)
public static final String A_zimbraZimletUserProperties = "zimbraZimletUserProperties";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* maximum number of user properties for zimlet allowed on an account
*
* @since ZCS 8.7.0,9.0.0
Expand All @@ -18085,6 +18110,7 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraZimletUserPropertiesMaxNumEntries = "zimbraZimletUserPropertiesMaxNumEntries";

/**
* Deprecated since: 23.9.0. Zimlets are not supported. Orig desc:
* Version of the Zimlet
*/
@ZAttr(id=282)
Expand Down
10 changes: 0 additions & 10 deletions common/src/main/java/com/zimbra/common/localconfig/LC.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,6 @@ public final class LC {
public static final KnownKey ldap_cache_xmppcomponent_maxsize = KnownKey.newKey(100);
public static final KnownKey ldap_cache_xmppcomponent_maxage = KnownKey.newKey(15);

@Supported public static final KnownKey ldap_cache_zimlet_maxsize = KnownKey.newKey(100);

@Supported public static final KnownKey ldap_cache_zimlet_maxage = KnownKey.newKey(15);

public static final KnownKey ldap_cache_custom_dynamic_group_membership_maxage_ms =
KnownKey.newKey(10 * Constants.MILLIS_PER_MINUTE);

Expand Down Expand Up @@ -554,12 +550,6 @@ public final class LC {

public static final KnownKey ssl_default_digest = KnownKey.newKey("sha256");

@Supported
public static final KnownKey zimlet_directory =
KnownKey.newKey("${zimbra_home}/zimlets-deployed");

public static final KnownKey zimlet_deploy_timeout = KnownKey.newKey("10"); // seconds

@Supported
public static final KnownKey calendar_outlook_compatible_allday_events = KnownKey.newKey(false);

Expand Down
16 changes: 0 additions & 16 deletions common/src/main/java/com/zimbra/common/soap/AccountConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,8 @@ private AccountConstants() {
public static final String E_GET_WHITE_BLACK_LIST_RESPONSE = "GetWhiteBlackListResponse";
public static final String E_MODIFY_PREFS_REQUEST = "ModifyPrefsRequest";
public static final String E_MODIFY_PREFS_RESPONSE = "ModifyPrefsResponse";
public static final String E_MODIFY_PROPERTIES_REQUEST = "ModifyPropertiesRequest";
public static final String E_MODIFY_PROPERTIES_RESPONSE = "ModifyPropertiesResponse";
public static final String E_MODIFY_WHITE_BLACK_LIST_REQUEST = "ModifyWhiteBlackListRequest";
public static final String E_MODIFY_WHITE_BLACK_LIST_RESPONSE = "ModifyWhiteBlackListResponse";
public static final String E_MODIFY_ZIMLET_PREFS_REQUEST = "ModifyZimletPrefsRequest";
public static final String E_MODIFY_ZIMLET_PREFS_RESPONSE = "ModifyZimletPrefsResponse";

// GAL
public static final String E_AUTO_COMPLETE_GAL_REQUEST = "AutoCompleteGalRequest";
Expand Down Expand Up @@ -183,18 +179,10 @@ private AccountConstants() {
QName.get(E_GET_WHITE_BLACK_LIST_RESPONSE, NAMESPACE);
public static final QName MODIFY_PREFS_REQUEST = QName.get(E_MODIFY_PREFS_REQUEST, NAMESPACE);
public static final QName MODIFY_PREFS_RESPONSE = QName.get(E_MODIFY_PREFS_RESPONSE, NAMESPACE);
public static final QName MODIFY_PROPERTIES_REQUEST =
QName.get(E_MODIFY_PROPERTIES_REQUEST, NAMESPACE);
public static final QName MODIFY_PROPERTIES_RESPONSE =
QName.get(E_MODIFY_PROPERTIES_RESPONSE, NAMESPACE);
public static final QName MODIFY_WHITE_BLACK_LIST_REQUEST =
QName.get(E_MODIFY_WHITE_BLACK_LIST_REQUEST, NAMESPACE);
public static final QName MODIFY_WHITE_BLACK_LIST_RESPONSE =
QName.get(E_MODIFY_WHITE_BLACK_LIST_RESPONSE, NAMESPACE);
public static final QName MODIFY_ZIMLET_PREFS_REQUEST =
QName.get(E_MODIFY_ZIMLET_PREFS_REQUEST, NAMESPACE);
public static final QName MODIFY_ZIMLET_PREFS_RESPONSE =
QName.get(E_MODIFY_ZIMLET_PREFS_RESPONSE, NAMESPACE);

// GAL
public static final QName AUTO_COMPLETE_GAL_REQUEST =
Expand Down Expand Up @@ -418,10 +406,6 @@ private AccountConstants() {
public static final String A_OWNER_OF = "ownerOf";
public static final String A_PERSIST_AUTH_TOKEN_COOKIE = "persistAuthTokenCookie";
public static final String A_TOTAL = "total";
public static final String A_ZIMLET = "zimlet";
public static final String A_ZIMLET_BASE_URL = "baseUrl";
public static final String A_ZIMLET_PRIORITY = "priority";
public static final String A_ZIMLET_PRESENCE = "presence";
public static final String A_TIMESTAMP = "timestamp";
public static final String A_TOKENIZE_KEY = "tokenizeKey";
public static final String A_EXPIRES = "expires";
Expand Down
Loading

0 comments on commit 8d8da00

Please sign in to comment.