Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ This SDK provides functionality to connect to both on-premise and Cloud-based se

Download [the latest JAR][2] from the developer portal or grab via Gradle:
```groovy
compile 'org.alfresco.mobile.android.sdk:alfresco-mobile-android-client-api:1.4.0'
compile 'org.alfresco.mobile.android.sdk:alfresco-mobile-android-client-api:1.4.1'
```
or Maven:
```xml
<dependency>
<groupId>org.alfresco.mobile.android.sdk</groupId>
<artifactId>alfresco-mobile-android-client-api</artifactId>
<version>1.4.0</version>
<version>1.4.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion alfresco-mobile-android-client-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk</groupId>
<artifactId>alfresco-mobile-android-sdk</artifactId>
<version>1.4.0</version>
<version>1.4.1</version>
</parent>

<artifactId>alfresco-mobile-android-client-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ public interface OnPremiseConstant

String STATUS_VALUE = "status";

String MEMEBERPERSONID_VALUE = "memberPersonId";

String MEMEBERUSERNAME_VALUE = "memberUserName";

String MEMEBERFIRSTNAME_VALUE = "memberFirstName";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ public static ActivityEntryImpl parseJson(Map<String, Object> jo)
JSONConverter.getString(activitySummary, CloudConstant.USERUSERNAME_VALUE));
activityItem.data.put(CloudConstant.USERLASTNAME_VALUE,
JSONConverter.getString(activitySummary, CloudConstant.USERLASTNAME_VALUE));
activityItem.data.put(CloudConstant.MEMEBERPERSONID_VALUE,
JSONConverter.getString(activitySummary, CloudConstant.MEMEBERPERSONID_VALUE));

return activityItem;
}
Expand Down Expand Up @@ -198,6 +200,8 @@ public static ActivityEntryImpl parsePublicAPIJson(Map<String, Object> jo)
JSONConverter.getString(activitySummary, CloudConstant.USERUSERNAME_VALUE));
activityItem.data.put(CloudConstant.USERLASTNAME_VALUE,
JSONConverter.getString(activitySummary, CloudConstant.USERLASTNAME_VALUE));
activityItem.data.put(CloudConstant.MEMEBERPERSONID_VALUE,
JSONConverter.getString(activitySummary, CloudConstant.MEMEBERPERSONID_VALUE));

return activityItem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import org.apache.chemistry.opencmis.commons.impl.JSONConverter;

/**
* Provides informations about Alfresco Share site. </br> A site is a project
* area where you can share content and collaborate with other site
* members.</br> Each site has a visibility setting that marks the site as
* public or private.
* Provides informations about Alfresco Share site. </br>
* A site is a project area where you can share content and collaborate with
* other site members.</br>
* Each site has a visibility setting that marks the site as public or private.
*
* @author Jean Marie Pascal
*/
Expand Down Expand Up @@ -116,12 +116,41 @@ public static SiteImpl parseJson(Map<String, Object> json)
site.visibility = JSONConverter.getString(json, OnPremiseConstant.VISIBILITY_VALUE);

// Extra properties
site.isPendingMember = (JSONConverter.getBoolean(json, OnPremiseConstant.ISPENDINGMEMBER_VALUE) != null) ? JSONConverter
.getBoolean(json, OnPremiseConstant.ISPENDINGMEMBER_VALUE) : false;
site.isMember = (JSONConverter.getBoolean(json, OnPremiseConstant.ISMEMBER_VALUE) != null) ? JSONConverter
.getBoolean(json, OnPremiseConstant.ISMEMBER_VALUE) : false;
site.isFavorite = (JSONConverter.getBoolean(json, OnPremiseConstant.ISFAVORITE_VALUE) != null) ? JSONConverter
.getBoolean(json, OnPremiseConstant.ISFAVORITE_VALUE) : false;
site.isPendingMember = (JSONConverter.getBoolean(json, OnPremiseConstant.ISPENDINGMEMBER_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISPENDINGMEMBER_VALUE) : false;
site.isMember = (JSONConverter.getBoolean(json, OnPremiseConstant.ISMEMBER_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISMEMBER_VALUE) : false;
site.isFavorite = (JSONConverter.getBoolean(json, OnPremiseConstant.ISFAVORITE_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISFAVORITE_VALUE) : false;

return site;
}

public static SiteImpl parseCompatJson(Map<String, Object> json)
{
SiteImpl site = new SiteImpl();

site.identifier = JSONConverter.getString(json, OnPremiseConstant.SHORTNAME_VALUE);
site.title = JSONConverter.getString(json, OnPremiseConstant.TITLE_VALUE);
site.description = JSONConverter.getString(json, OnPremiseConstant.DESCRIPTION_VALUE);
if (site.description.length() == 0)
{
site.description = null;
}

site.nodeIdentifier = JSONConverter.getString(json, OnPremiseConstant.NODE_VALUE);
int lastForwardSlash = site.nodeIdentifier.lastIndexOf('/');
site.nodeIdentifier = site.nodeIdentifier.substring(lastForwardSlash + 1);

site.visibility = JSONConverter.getString(json, OnPremiseConstant.VISIBILITY_VALUE);

// Extra properties
site.isPendingMember = (JSONConverter.getBoolean(json, OnPremiseConstant.ISPENDINGMEMBER_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISPENDINGMEMBER_VALUE) : false;
site.isMember = (JSONConverter.getBoolean(json, OnPremiseConstant.ISMEMBER_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISMEMBER_VALUE) : false;
site.isFavorite = (JSONConverter.getBoolean(json, OnPremiseConstant.ISFAVORITE_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISFAVORITE_VALUE) : false;

return site;
}
Expand All @@ -144,8 +173,8 @@ public static SiteImpl parsePublicAPIJson(Map<String, Object> json)
site.nodeIdentifier = JSONConverter.getString(json, CloudConstant.GUID_VALUE);

// Extra properties
site.isPendingMember = (JSONConverter.getBoolean(json, CloudConstant.ISPENDINGMEMBER_VALUE) != null) ? JSONConverter
.getBoolean(json, OnPremiseConstant.ISPENDINGMEMBER_VALUE) : false;
site.isPendingMember = (JSONConverter.getBoolean(json, CloudConstant.ISPENDINGMEMBER_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISPENDINGMEMBER_VALUE) : false;

// Cache information might be obsolete => so let's use role
if (json.containsKey(CloudConstant.ROLE_VALUE))
Expand All @@ -154,11 +183,11 @@ public static SiteImpl parsePublicAPIJson(Map<String, Object> json)
}
else
{
site.isMember = (JSONConverter.getBoolean(json, CloudConstant.ISMEMBER_VALUE) != null) ? JSONConverter
.getBoolean(json, OnPremiseConstant.ISMEMBER_VALUE) : false;
site.isMember = (JSONConverter.getBoolean(json, CloudConstant.ISMEMBER_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISMEMBER_VALUE) : false;
}
site.isFavorite = (JSONConverter.getBoolean(json, CloudConstant.ISFAVORITE_VALUE) != null) ? JSONConverter
.getBoolean(json, OnPremiseConstant.ISFAVORITE_VALUE) : false;
site.isFavorite = (JSONConverter.getBoolean(json, CloudConstant.ISFAVORITE_VALUE) != null)
? JSONConverter.getBoolean(json, OnPremiseConstant.ISFAVORITE_VALUE) : false;

return site;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
* Sites are a key concept within Alfresco Share for managing documents, wiki
* pages, blog posts, discussions, and other collaborative content relating to
* teams, projects, communities of interest, and other types of collaborative
* sites. </br> There are various methods relating to the Sites service,
* including the ability to:
* sites. </br>
* There are various methods relating to the Sites service, including the
* ability to:
* <ul>
* <li>List Sites (Favorites, all sites, user are member of)</li>
* </ul>
Expand All @@ -44,7 +45,7 @@ public interface SiteService extends Service
{

/**
* Allowable sorting property : Name of the document or folder.
* Allowable sorting property : Name of the site.
*/
String SORT_PROPERTY_SHORTNAME = OnPremiseConstant.SHORTNAME_VALUE;

Expand Down Expand Up @@ -146,7 +147,8 @@ public interface SiteService extends Service
Site addFavoriteSite(Site site);

/**
* Removes the given site from the current users list of favorite sites. <br/>
* Removes the given site from the current users list of favorite sites.
* <br/>
* It's possible to favorite a site independently of its visibility.
*
* @since 1.1.0
Expand All @@ -164,7 +166,8 @@ public interface SiteService extends Service
*
* @since 1.1.0
* @param site : site object
* @return If the site is moderated, a JoinSiteRequest object is returned. <br/>
* @return If the site is moderated, a JoinSiteRequest object is returned.
* <br/>
* If the site is public null is returned.
* @throws AlfrescoServiceException : <br/>
* If the current user is already a member of the site or there
Expand Down Expand Up @@ -272,4 +275,23 @@ public interface SiteService extends Service
* @return
*/
PagingResult<Person> searchMembers(Site site, String keywords, ListingContext listingContext);

/**
* @return Returns a list of sites which matches the current keywords.
* @since 1.4.1
* @param keyword
* @return Returns a paged list of sites the current user has requested by
* its search.
*/
PagingResult<Site> search(String keyword, ListingContext listingContext);

/**
* @return Returns a list of sites which matches the current keywords.
* @since 1.4.1
* @param keyword
* @return Returns a list of sites the current user has requested by its
* search.
*/
List<Site> search(String keyword);

}
Loading