Skip to content

Commit

Permalink
Update Version Number
Browse files Browse the repository at this point in the history
Support ANDROID-23
  • Loading branch information
JM.PASCAL committed Jul 23, 2015
1 parent 8a65964 commit bebbdee
Show file tree
Hide file tree
Showing 17 changed files with 259 additions and 84 deletions.
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-SNAPSHOT</version>
</parent>

<artifactId>alfresco-mobile-android-client-api</artifactId>
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

0 comments on commit bebbdee

Please sign in to comment.