├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── pom.xml
└── src
    ├── main
        ├── java
        │   └── org
        │   │   └── springframework
        │   │       └── social
        │   │           ├── connect
        │   │               └── support
        │   │               │   ├── RefreshingOAuth2Connection.java
        │   │               │   └── RefreshingOAuth2ConnectionFactory.java
        │   │           └── salesforce
        │   │               ├── api
        │   │                   ├── AbstractLimits.java
        │   │                   ├── ApiOperations.java
        │   │                   ├── ApiVersion.java
        │   │                   ├── ChatterOperations.java
        │   │                   ├── Community.java
        │   │                   ├── CommunityUser.java
        │   │                   ├── ConnectOperations.java
        │   │                   ├── CustomApiOperations.java
        │   │                   ├── Field.java
        │   │                   ├── InvalidIDException.java
        │   │                   ├── InvalidSalesforceApiVersionException.java
        │   │                   ├── LimitResult.java
        │   │                   ├── LimitsOperations.java
        │   │                   ├── LimitsResults.java
        │   │                   ├── Photo.java
        │   │                   ├── PickListEntry.java
        │   │                   ├── QueryOperations.java
        │   │                   ├── QueryResult.java
        │   │                   ├── RecentOperations.java
        │   │                   ├── RecordTypeInfo.java
        │   │                   ├── Relationship.java
        │   │                   ├── ResultItem.java
        │   │                   ├── SObjectDetail.java
        │   │                   ├── SObjectOperations.java
        │   │                   ├── SObjectSummary.java
        │   │                   ├── Salesforce.java
        │   │                   ├── SalesforceProfile.java
        │   │                   ├── SalesforceRequestException.java
        │   │                   ├── SalesforceUserDetails.java
        │   │                   ├── SearchOperations.java
        │   │                   ├── Status.java
        │   │                   ├── UserOperations.java
        │   │                   └── impl
        │   │                   │   ├── AbstractSalesForceOperations.java
        │   │                   │   ├── ApiRequestInterceptor.java
        │   │                   │   ├── ApiTemplate.java
        │   │                   │   ├── ChatterTemplate.java
        │   │                   │   ├── ConnectTemplate.java
        │   │                   │   ├── CustomApiTemplate.java
        │   │                   │   ├── HeaderAddingInterceptor.java
        │   │                   │   ├── LimitsOperationsTemplate.java
        │   │                   │   ├── QueryTemplate.java
        │   │                   │   ├── RecentTemplate.java
        │   │                   │   ├── SObjectsTemplate.java
        │   │                   │   ├── SalesforceErrorHandler.java
        │   │                   │   ├── SalesforceTemplate.java
        │   │                   │   ├── SearchTemplate.java
        │   │                   │   ├── UserOperationsTemplate.java
        │   │                   │   └── json
        │   │                   │       ├── ApiVersionMixin.java
        │   │                   │       ├── FieldMixin.java
        │   │                   │       ├── PhotoMixin.java
        │   │                   │       ├── PickListEntryMixin.java
        │   │                   │       ├── QueryResultMixin.java
        │   │                   │       ├── RecordTypeInfoMixin.java
        │   │                   │       ├── RelationshipMixin.java
        │   │                   │       ├── ResultItemDeserializer.java
        │   │                   │       ├── ResultItemMixin.java
        │   │                   │       ├── SObjectDetailMixin.java
        │   │                   │       ├── SObjectSummaryMixin.java
        │   │                   │       ├── SalesforceModule.java
        │   │                   │       ├── SalesforceProfileMixin.java
        │   │                   │       ├── SalesforceUserDetailsMixin.java
        │   │                   │       └── StatusMixin.java
        │   │               ├── client
        │   │                   ├── BaseSalesforceFactory.java
        │   │                   ├── ErrorHandler.java
        │   │                   ├── SalesforceFactory.java
        │   │                   └── SimpleCachingSalesforceFactory.java
        │   │               ├── config
        │   │                   ├── support
        │   │                   │   └── SalesforceApiHelper.java
        │   │                   └── xml
        │   │                   │   ├── SalesforceConfigBeanDefinitionParser.java
        │   │                   │   └── SalesforceNamespaceHandler.java
        │   │               ├── connect
        │   │                   ├── SalesforceAdapter.java
        │   │                   ├── SalesforceConnectionFactory.java
        │   │                   ├── SalesforceOAuth2Template.java
        │   │                   └── SalesforceServiceProvider.java
        │   │               └── security
        │   │                   └── SalesforceAuthenticationService.java
        └── resources
        │   ├── META-INF
        │       ├── spring.handlers
        │       └── spring.schemas
        │   └── org
        │       └── springframework
        │           └── social
        │               └── salesforce
        │                   └── config
        │                       └── xml
        │                           └── spring-social-salesforce-1.0.xsd
    └── test
        ├── java
            └── org
            │   └── springframework
            │       └── social
            │           └── salesforce
            │               └── api
            │                   ├── client
            │                       └── BaseSalesforceFactoryTest.java
            │                   └── impl
            │                       ├── AbstractSalesforceTest.java
            │                       ├── ApiTest.java
            │                       ├── ChatterTemplateTest.java
            │                       ├── ConnectOperationsTest.java
            │                       ├── CustomApiOperationTest.java
            │                       ├── LimitsTemplateTest.java
            │                       ├── MetaApiTemplateTest.java
            │                       ├── QueryTemplateTest.java
            │                       ├── RecentTemplateTest.java
            │                       ├── SObjectsTemplateTest.java
            │                       ├── SearchTemplateTest.java
            │                       └── UserOperationsTemplateTest.java
        └── resources
            ├── account.json
            ├── account2.json
            ├── account_desc.json
            ├── chatter-status.json
            ├── client-token.json
            ├── communities.json
            ├── community-users.json
            ├── customApi1.json
            ├── limits.json
            ├── logback-test.xml
            ├── profile.json
            ├── query-child2parent.json
            ├── query-count.json
            ├── query-groupby.json
            ├── query-parent2child.json
            ├── query-simple.json
            ├── query-where.json
            ├── recent.json
            ├── search.json
            ├── services.json
            ├── services2.json
            ├── sobjects.json
            ├── userDetails.json
            └── versions.json
/.gitignore:
--------------------------------------------------------------------------------
 1 | ApiTestLocal.java
 2 | target
 3 | *.iml
 4 | *.ipr
 5 | .idea
 6 | .project
 7 | .settings
 8 | .classpath
 9 | .vscode/settings.json
10 | 
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: java
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
 1 | # Spring Social Salesforce [](https://travis-ci.org/jottley/spring-social-salesforce) [](https://repo.repsy.io/mvn/jottley/spring-social-salesforce/org/springframework/social/spring-social-salesforce/1.2.3.RELEASE)
 2 | 
 3 | Spring Social Salesforce is a Spring Social extension that provides connection support and API binding for the Salesforce
 4 | REST API.
 5 | 
 6 | To check out the project and build from source, do the following:
 7 | 
 8 |     git clone git://github.com/jottley/spring-social-salesforce.git
 9 |     cd spring-social-salesforce
10 |     mvn clean install
11 |     
12 | ## Maven
13 | To include in your maven project, use the following repository and dependency
14 | 
15 |     
16 |     ...
17 |         
18 |             repsy
19 |             https://repo.repsy.io/mvn/jottley/spring-social-salesforce
20 |         
21 |     ...
22 |     
23 |     
24 |     
25 |     ...
26 |         
27 |             org.springframework.social
28 |             spring-social-salesforce
29 |             1.2.3.RELEASE
30 |         
31 |     ...
32 |     
33 |     
34 | ## Quickstart
35 | There is a spring boot quickstart app available at https://github.com/jottley/spring-social-salesforce-quickstart
36 | 
37 | ## Supported Operations
38 |  - Retrieve all available API versions
39 |  - Retrieve services supported by a specific version of the API
40 |  - Retrieve the list of sObjects
41 |  - Retrieve summary-metadata of a sObject
42 |  - Retrieve full-metadata of a sObject
43 |  - Retrieve a row from a sObject
44 |  - Retrieve a blob from a row in a sObject
45 |  - Create a new sObject
46 |  - Update an existing sObject
47 |  - Retrieve recent changes feed
48 |  - Execute a SOSL search and retrieve the results (with paging or all)
49 |  - Run a SOQL query and retrieve the results (with paging or all)
50 |    - query results can optionally include deleted records
51 |  - Retrieve user profile
52 |  - Retrieve user status
53 |  - Update user status
54 |  - List the limits of an org
55 |  - Check the current API limit and usage
56 |  - Get a list of Communities (Digitial Experience)
57 |  - Get a list of Community (Digitial Experience) users 
58 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/connect/support/RefreshingOAuth2Connection.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.connect.support;
17 | 
18 | import org.springframework.social.connect.ApiAdapter;
19 | import org.springframework.social.connect.ConnectionData;
20 | import org.springframework.social.oauth2.OAuth2ServiceProvider;
21 | 
22 | /**
23 |  * @author Umut Utkan
24 |  */
25 | public class RefreshingOAuth2Connection extends OAuth2Connection {
26 | 
27 |     public RefreshingOAuth2Connection(String providerId, String providerUserId, String accessToken, String refreshToken, Long expireTime, OAuth2ServiceProvider aoAuth2ServiceProvider, ApiAdapter aApiAdapter) {
28 |         super(providerId, providerUserId, accessToken, refreshToken, expireTime, aoAuth2ServiceProvider, aApiAdapter);
29 |     }
30 | 
31 |     public RefreshingOAuth2Connection(ConnectionData data, OAuth2ServiceProvider aoAuth2ServiceProvider, ApiAdapter aApiAdapter) {
32 |         super(data, aoAuth2ServiceProvider, aApiAdapter);
33 |     }
34 | 
35 | 
36 | 
37 |     @Override
38 |     public A getApi() {
39 |         if (hasExpired()) {
40 |             refresh();
41 |         }
42 |         return super.getApi();
43 |     }
44 | 
45 | }
46 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/connect/support/RefreshingOAuth2ConnectionFactory.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.connect.support;
17 | 
18 | import org.springframework.social.connect.ApiAdapter;
19 | import org.springframework.social.connect.Connection;
20 | import org.springframework.social.connect.ConnectionData;
21 | import org.springframework.social.oauth2.AccessGrant;
22 | import org.springframework.social.oauth2.OAuth2ServiceProvider;
23 | 
24 | /**
25 |  * @author Umut Utkan
26 |  */
27 | public class RefreshingOAuth2ConnectionFactory extends OAuth2ConnectionFactory {
28 | 
29 |     public RefreshingOAuth2ConnectionFactory(String providerId, OAuth2ServiceProvider soAuth2ServiceProvider, ApiAdapter sApiAdapter) {
30 |         super(providerId, soAuth2ServiceProvider, sApiAdapter);
31 |     }
32 | 
33 | 
34 |     @Override
35 |     public Connection createConnection(AccessGrant accessGrant) {
36 |         return new RefreshingOAuth2Connection(getProviderId(), extractProviderUserId(accessGrant), accessGrant.getAccessToken(),
37 |                 accessGrant.getRefreshToken(), accessGrant.getExpireTime(), (OAuth2ServiceProvider) getServiceProvider(), getApiAdapter());
38 |     }
39 | 
40 |     @Override
41 |     public Connection createConnection(ConnectionData data) {
42 |         return new RefreshingOAuth2Connection(data, (OAuth2ServiceProvider) getServiceProvider(), getApiAdapter());
43 |     }
44 | 
45 | }
46 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/AbstractLimits.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2019 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.io.Serializable;
19 | import java.util.HashMap;
20 | import java.util.Map;
21 | 
22 | import com.fasterxml.jackson.annotation.JsonAnyGetter;
23 | import com.fasterxml.jackson.annotation.JsonAnySetter;
24 | import com.fasterxml.jackson.annotation.JsonIgnore;
25 | import com.fasterxml.jackson.annotation.JsonInclude;
26 | import com.fasterxml.jackson.annotation.JsonProperty;
27 | 
28 | @JsonInclude(JsonInclude.Include.NON_NULL)
29 | /**
30 |  * The core limits properties. Any additional limits for connected apps can call
31 |  * be found in the additional properties
32 |  * 
33 |  * @author Jared Ottley
34 |  */
35 | public class AbstractLimits implements Serializable {
36 | 
37 |     private static final long serialVersionUID = 6213553807904726408L;
38 | 
39 |     @JsonProperty("Max")
40 |     private int max;
41 | 
42 |     @JsonProperty("Remaining")
43 |     private int remaining;
44 | 
45 |     @JsonIgnore
46 |     private Map additionalProperties = new HashMap();
47 | 
48 |     /**
49 |      * NOOP
50 |      */
51 |     public AbstractLimits() {
52 | 
53 |     }
54 | 
55 |     /**
56 |      * 
57 |      * @param remaining
58 |      * @param max
59 |      */
60 |     public AbstractLimits(int max, int remaining) {
61 |         this.max = max;
62 |         this.remaining = remaining;
63 |     }
64 | 
65 |     @JsonProperty("Max")
66 |     public int getMax() {
67 |         return max;
68 |     }
69 | 
70 |     @JsonProperty("Remaining")
71 |     public int getRemaining() {
72 |         return remaining;
73 |     }
74 | 
75 |     @JsonAnyGetter
76 |     public Map getAdditionalProperties() {
77 |         return this.additionalProperties;
78 |     }
79 | 
80 |     @JsonAnySetter
81 |     public void setAdditionalProperty(String name, Object value) {
82 |         this.additionalProperties.put(name, value);
83 |     }
84 | 
85 | }
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/ApiOperations.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.util.List;
19 | import java.util.Map;
20 | 
21 | /**
22 |  * Defines operations for getting info on the API.
23 |  *
24 |  * @author Umut Utkan
25 |  * @author Jared Ottley
26 |  */
27 | public interface ApiOperations {
28 | 
29 |     static final String DEFAULT_API_VERSION = "v37.0";
30 |     
31 |     List getVersions();
32 | 
33 |     Map getServices(String version);
34 |     
35 |     Map getServices();
36 |     
37 |     void setVersion(String version)
38 |             throws InvalidSalesforceApiVersionException;
39 |     
40 |     String getVersion();
41 | }
42 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/ApiVersion.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.io.Serializable;
19 | 
20 | /**
21 |  * @author Umut Utkan
22 |  */
23 | public class ApiVersion implements Serializable {
24 | 
25 |     private String label;
26 | 
27 |     private String version;
28 | 
29 |     private String url;
30 | 
31 | 
32 |     public ApiVersion(String version, String label, String url) {
33 |         this.version = version;
34 |         this.label = label;
35 |         this.url = url;
36 |     }
37 | 
38 | 
39 |     public String getLabel() {
40 |         return label;
41 |     }
42 | 
43 |     public String getVersion() {
44 |         return version;
45 |     }
46 | 
47 |     public String getUrl() {
48 |         return url;
49 |     }
50 | 
51 |     @Override
52 |     public String toString() {
53 |         return "ApiVersion{" +
54 |                 "label='" + label + '\'' +
55 |                 ", version='" + version + '\'' +
56 |                 ", url='" + url + '\'' +
57 |                 '}';
58 |     }
59 | 
60 | }
61 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/ChatterOperations.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | /**
19 |  * Defines operations for interacting with the Chatter API.
20 |  *
21 |  * @author Umut Utkan
22 |  */
23 | public interface ChatterOperations {
24 | 
25 |     /**
26 |      * Retrieves current users's profile
27 |      *
28 |      * @return user profile
29 |      */
30 |     public SalesforceProfile getUserProfile();
31 | 
32 |     /**
33 |      * Retrieves the given user's profile
34 |      *
35 |      * @param userId The salesforce Id of the user
36 |      * @return user profile
37 |      */
38 |     public SalesforceProfile getUserProfile(String userId);
39 | 
40 |     /**
41 |      * Retrieves current user's status
42 |      *
43 |      * @return status
44 |      */
45 |     public Status getStatus();
46 | 
47 |     /**
48 |      * Retrieves the given user's status
49 |      *
50 |      * @param userId The salesforce Id of the user
51 |      * @return status
52 |      */
53 |     public Status getStatus(String userId);
54 | 
55 |     /**
56 |      * Updates current user's status with the given message
57 |      *
58 |      * @param message The message to be posted as the current user's status
59 |      * @return status
60 |      */
61 |     public Status updateStatus(String message);
62 | 
63 |     /**
64 |      * Updates the given user's status with the given message
65 |      *
66 |      * @param userId The salesforce Id of the user
67 |      * @param message The message to be posted as the current user's status
68 |      * @return status
69 |      */
70 |     public Status updateStatus(String userId, String message);
71 | 
72 | }
73 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/CommunityUser.java:
--------------------------------------------------------------------------------
  1 | /**
  2 |  * Copyright (C) 2021 https://github.com/jottley/spring-social-salesforce
  3 |  *
  4 |  * Licensed under the Apache License, Version 2.0 (the "License");
  5 |  * you may not use this file except in compliance with the License.
  6 |  * You may obtain a copy of the License at
  7 |  *
  8 |  *         http://www.apache.org/licenses/LICENSE-2.0
  9 |  *
 10 |  * Unless required by applicable law or agreed to in writing, software
 11 |  * distributed under the License is distributed on an "AS IS" BASIS,
 12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13 |  * See the License for the specific language governing permissions and
 14 |  * limitations under the License.
 15 |  */
 16 | package org.springframework.social.salesforce.api;
 17 | 
 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 19 | 
 20 | @JsonIgnoreProperties(ignoreUnknown = true)
 21 | public class CommunityUser {
 22 | 
 23 |     private String communityNickname;
 24 | 
 25 |     private String companyName;
 26 | 
 27 |     private String displayName;
 28 | 
 29 |     private String email;
 30 | 
 31 |     private String firstName;
 32 | 
 33 |     private boolean hasChatter;
 34 | 
 35 |     private String id;
 36 | 
 37 |     private boolean isInThisCommunity;
 38 | 
 39 |     private String lastName;
 40 | 
 41 |     private String name;
 42 | 
 43 |     private String username;
 44 | 
 45 |     private String aboutMe;
 46 | 
 47 |     private String contactName;
 48 | 
 49 |     public String getCommunityNickname() {
 50 |         return communityNickname;
 51 |     }
 52 | 
 53 |     public void setCommunityNickname(String communityNickname) {
 54 |         this.communityNickname = communityNickname;
 55 |     }
 56 | 
 57 |     public String getCompanyName() {
 58 |         return companyName;
 59 |     }
 60 | 
 61 |     public void setCompanyName(String companyName) {
 62 |         this.companyName = companyName;
 63 |     }
 64 | 
 65 |     public String getDisplayName() {
 66 |         return displayName;
 67 |     }
 68 | 
 69 |     public void setDisplayName(String displayName) {
 70 |         this.displayName = displayName;
 71 |     }
 72 | 
 73 |     public String getEmail() {
 74 |         return email;
 75 |     }
 76 | 
 77 |     public void setEmail(String email) {
 78 |         this.email = email;
 79 |     }
 80 | 
 81 |     public String getFirstName() {
 82 |         return firstName;
 83 |     }
 84 | 
 85 |     public void setFirstName(String firstName) {
 86 |         this.firstName = firstName;
 87 |     }
 88 | 
 89 |     public boolean isHasChatter() {
 90 |         return hasChatter;
 91 |     }
 92 | 
 93 |     public void setHasChatter(boolean hasChatter) {
 94 |         this.hasChatter = hasChatter;
 95 |     }
 96 | 
 97 |     public String getId() {
 98 |         return id;
 99 |     }
100 | 
101 |     public void setId(String id) {
102 |         this.id = id;
103 |     }
104 | 
105 |     public boolean isInThisCommunity() {
106 |         return isInThisCommunity;
107 |     }
108 | 
109 |     public void setInThisCommunity(boolean inThisCommunity) {
110 |         isInThisCommunity = inThisCommunity;
111 |     }
112 | 
113 |     public String getLastName() {
114 |         return lastName;
115 |     }
116 | 
117 |     public void setLastName(String lastName) {
118 |         this.lastName = lastName;
119 |     }
120 | 
121 |     public String getName() {
122 |         return name;
123 |     }
124 | 
125 |     public void setName(String name) {
126 |         this.name = name;
127 |     }
128 | 
129 |     public String getUsername() {
130 |         return username;
131 |     }
132 | 
133 |     public void setUsername(String username) {
134 |         this.username = username;
135 |     }
136 | 
137 |     public String getAboutMe() {
138 |         return aboutMe;
139 |     }
140 | 
141 |     public void setAboutMe(String aboutMe) {
142 |         this.aboutMe = aboutMe;
143 |     }
144 | 
145 |     public String getContactName() {
146 |         return contactName;
147 |     }
148 | 
149 |     public void setContactName(String contactName) {
150 |         this.contactName = contactName;
151 |     }
152 | }
153 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/ConnectOperations.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2021 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.util.List;
19 | 
20 | public interface ConnectOperations {
21 | 
22 |     List getCommunities();
23 | 
24 |     List getCommunityUsers(String communityId);
25 | }
26 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/CustomApiOperations.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2021 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.util.Map;
19 | 
20 | import org.springframework.http.HttpEntity;
21 | import org.springframework.http.HttpMethod;
22 | import org.springframework.http.ResponseEntity;
23 | 
24 | /**
25 |  * Defines operations for calling custom apex exposed rest apis.
26 |  *
27 |  * @author Sanchit Agarwal
28 |  *
29 |  */
30 | public interface CustomApiOperations {
31 | 
32 | 	 T postForApexObject(String uriPath, Object request, Class responseType);
33 | 
34 | 	 T postForApexObject(String uriPath, Object request, Class responseType, Map uriVariables);
35 | 
36 | 	 T getForApexObject(String uriPath, Class responseType);
37 | 
38 | 	 T getForApexObject(String uriPath, Class responseType, Map uriVariables);
39 | 
40 | 	 T putForApexObject(String uriPath, Object request, Class responseType);
41 | 
42 | 	 T putForApexObject(String uriPath, Object request, Class responseType, Map uriVariables);
43 | 
44 | 	 T patchForApexObject(String uriPath, Object request, Class responseType);
45 | 
46 | 	 T patchForApexObject(String uriPath, Object request, Class responseType, Map uriVariables);
47 | 
48 | 	 T deleteForApexObject(String uriPath, Class responseType);
49 | 
50 | 	 T deleteForApexObject(String uriPath, Class responseType, Map uriVariablesMap);
51 | 
52 | 	// for custom api - (to get headers and body)
53 | 	 ResponseEntity executeApexApi(String uriPath, HttpMethod method, HttpEntity> request, Class responseType, Map uriVariables);
54 | 
55 | 	 ResponseEntity executeApexApi(String uriPath, HttpMethod method, HttpEntity> request, Class responseType);	
56 | }
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/InvalidIDException.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import org.springframework.social.ApiException;
19 | import org.springframework.social.salesforce.connect.SalesforceServiceProvider;
20 | 
21 | /**
22 |  * @author Umut Utkan
23 |  * @author Jared Ottley
24 |  */
25 | public class InvalidIDException extends ApiException {
26 | 
27 |     public InvalidIDException(String message) {
28 |         super(SalesforceServiceProvider.ID, message);
29 |     }
30 | 
31 | }
32 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/InvalidSalesforceApiVersionException.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | /**
19 |  * 
20 |  * @author Jared Ottley
21 |  *
22 |  */
23 | public class InvalidSalesforceApiVersionException 
24 |         extends Throwable
25 | {
26 |     public InvalidSalesforceApiVersionException()
27 |     {
28 |         //NOOP
29 |     }
30 |     
31 |     public InvalidSalesforceApiVersionException(String version)
32 |     {
33 |         super(version + " is not a valid Salesforce Api version.");
34 |     }
35 | }
36 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/LimitResult.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2019 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
19 | import com.fasterxml.jackson.annotation.JsonInclude;
20 | 
21 | import org.springframework.social.salesforce.api.AbstractLimits;
22 | 
23 | @JsonInclude(JsonInclude.Include.NON_NULL)
24 | @JsonIgnoreProperties(ignoreUnknown = true)
25 | /**
26 |  * @author Jared Ottley
27 |  */
28 | public class LimitResult extends AbstractLimits {
29 | 
30 |     private static final long serialVersionUID = 1L;
31 | 
32 |     /**
33 |      * No args constructor for use in serialization
34 |      * 
35 |      */
36 |     public LimitResult() {
37 |         super();
38 |     }
39 | 
40 |     /**
41 |      * 
42 |      * @param remaining
43 |      * @param max
44 |      */
45 |     public LimitResult(Integer max, Integer remaining) {
46 |         super(max, remaining);
47 |     }
48 | }
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/LimitsOperations.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2019 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | /**
19 |  * Defines operations for interacting with the Limits API.
20 |  *
21 |  * @author Jared Ottley
22 |  */
23 | public interface LimitsOperations {
24 | 
25 |     
26 |     /**
27 |      * Retrieve the organization limits
28 |      * 
29 |      * @return LimitsResults
30 |      */
31 |     public LimitsResults getLimits();
32 | 
33 |     /**
34 |      * Get the current Daily API limit.  This value is returned in a header from Salesforce.  The value is persisted here after each API call.
35 |      * @return
36 |      */
37 |     public int getDailyApiLimit();
38 | 
39 | 
40 |     /**
41 |      * Get the current Daily API usage.  This value is returned in a header from Salesforce.  The value is persisted here after each API call.
42 |      * @return
43 |      */
44 |     public int getDailyApiUsed();
45 |     
46 | }
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/Photo.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | 
19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
20 | 
21 | 
22 | /**
23 |  * @author Umut Utkan
24 |  */
25 | @JsonIgnoreProperties(ignoreUnknown = true)
26 | public class Photo {
27 | 
28 |     private String smallPhotoUrl;
29 | 
30 |     private String largePhotoUrl;
31 | 
32 | 
33 |     public Photo() {
34 | 
35 |     }
36 | 
37 | 
38 |     public String getSmallPhotoUrl() {
39 |         return smallPhotoUrl;
40 |     }
41 | 
42 |     public void setSmallPhotoUrl(String smallPhotoUrl) {
43 |         this.smallPhotoUrl = smallPhotoUrl;
44 |     }
45 | 
46 |     public String getLargePhotoUrl() {
47 |         return largePhotoUrl;
48 |     }
49 | 
50 |     public void setLargePhotoUrl(String largePhotoUrl) {
51 |         this.largePhotoUrl = largePhotoUrl;
52 |     }
53 | 
54 | }
55 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/PickListEntry.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | /**
19 |  * @author Umut Utkan
20 |  */
21 | public class PickListEntry {
22 | 
23 |     private String value;
24 | 
25 |     private boolean active;
26 | 
27 |     private String label;
28 | 
29 |     private boolean defaultValue;
30 | 
31 |     //TODO: find how to deserialize.
32 |     //private String validFor;
33 | 
34 | 
35 |     public PickListEntry(String value, String label, boolean active, boolean defaultValue) {
36 |         this.value = value;
37 |         this.active = active;
38 |         this.label = label;
39 |         this.defaultValue = defaultValue;
40 |     }
41 | 
42 | 
43 |     public String getValue() {
44 |         return value;
45 |     }
46 | 
47 |     public boolean isActive() {
48 |         return active;
49 |     }
50 | 
51 |     public String getLabel() {
52 |         return label;
53 |     }
54 | 
55 |     public boolean isDefaultValue() {
56 |         return defaultValue;
57 |     }
58 | 
59 | }
60 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/QueryOperations.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | /**
19 |  * Defines operations for executing SOQL queries.
20 |  *
21 |  * @author Umut Utkan
22 |  */
23 | public interface QueryOperations {
24 | 
25 |     /**
26 |      * Execute SOQL query and return the first page of results
27 |      * 
28 |      * @param query The SOQL query to execute
29 |      * @return QueryResult
30 |      */
31 |     QueryResult query(String query);
32 | 
33 |     /**
34 |      * Execute SOQL query and return the first page of results
35 |      *
36 |      * @param query The SOQL query to execute
37 |      * @param includeDeletedItems if result should include deleted items
38 |      * documentation https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_queryall.htm
39 |      * @return QueryResult
40 |      */
41 |     QueryResult query(String query, boolean includeDeletedItems);
42 | 
43 |     /*
44 |      * Retrieve next page of results based on argument from url (usually from query result "nextRecordsUrl")
45 |      */
46 |     QueryResult nextPage(String urlOrToken);
47 |     
48 |     /**
49 |      * Execute SOQL query and return all results.
50 |      * 
51 |      * @param query The SOQL query to execute
52 |      * @return QueryResult
53 |      */
54 |     QueryResult queryAll(String query);
55 | 
56 | }
57 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/QueryResult.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.util.List;
19 | 
20 | /**
21 |  * @author Umut Utkan
22 |  */
23 | public class QueryResult {
24 | 
25 |     private int totalSize;
26 | 
27 |     private boolean done;
28 | 
29 |     private String nextRecordsUrl;
30 | 
31 |     private List records;
32 | 
33 | 
34 |     public QueryResult(int totalSize, boolean done) {
35 |         this.totalSize = totalSize;
36 |         this.done = done;
37 |     }
38 | 
39 | 
40 |     public int getTotalSize() {
41 |         return totalSize;
42 |     }
43 | 
44 |     public boolean isDone() {
45 |         return done;
46 |     }
47 | 
48 |     public List getRecords() {
49 |         return records;
50 |     }
51 | 
52 |     public void setRecords(List records) {
53 |         this.records = records;
54 |     }
55 | 
56 |     public String getNextRecordsUrl() {
57 |         return nextRecordsUrl;
58 |     }
59 | 
60 |     public void setNextRecordsUrl(String nextRecordsUrl) {
61 |         this.nextRecordsUrl = nextRecordsUrl;
62 |     }
63 | 
64 |     public String getNextRecordsToken() {
65 |         if (this.nextRecordsUrl != null) {
66 |             return this.nextRecordsUrl.substring(this.nextRecordsUrl.lastIndexOf('/') + 1, this.nextRecordsUrl.length());
67 |         }
68 |         return null;
69 |     }
70 | 
71 | }
72 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/RecentOperations.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.util.List;
19 | 
20 | /**
21 |  * Defines operations for interacting with Recent API.
22 |  *
23 |  * @author Umut Utkan
24 |  */
25 | public interface RecentOperations {
26 | 
27 |     List recent();
28 | 
29 | }
30 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/RecordTypeInfo.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | /**
19 |  * @author Umut Utkan
20 |  */
21 | public class RecordTypeInfo {
22 | 
23 |     private String name;
24 | 
25 |     private boolean available;
26 | 
27 |     private String recordTypeId;
28 | 
29 |     private boolean defaultRecordTypeMapping;
30 | 
31 | 
32 |     public RecordTypeInfo(String name, boolean available, String recordTypeId, boolean defaultRecordTypeMapping) {
33 |         this.name = name;
34 |         this.available = available;
35 |         this.recordTypeId = recordTypeId;
36 |         this.defaultRecordTypeMapping = defaultRecordTypeMapping;
37 |     }
38 | 
39 | 
40 |     public String getName() {
41 |         return name;
42 |     }
43 | 
44 |     public boolean isAvailable() {
45 |         return available;
46 |     }
47 | 
48 |     public String getRecordTypeId() {
49 |         return recordTypeId;
50 |     }
51 | 
52 |     public boolean isDefaultRecordTypeMapping() {
53 |         return defaultRecordTypeMapping;
54 |     }
55 | 
56 | }
57 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/Relationship.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | /**
19 |  * @author Umut Utkan
20 |  */
21 | public class Relationship {
22 | 
23 |     private String field;
24 | 
25 |     private boolean deprecatedAndHidden;
26 | 
27 |     private String relationshipName;
28 | 
29 |     private boolean cascadeDelete;
30 | 
31 |     private boolean restrictedDelete;
32 | 
33 |     private String childSObject;
34 | 
35 | 
36 |     public Relationship(String field, String relationshipName, String childObject) {
37 |         this.field = field;
38 |         this.relationshipName = relationshipName;
39 |         this.childSObject = childObject;
40 |     }
41 | 
42 | 
43 |     public String getField() {
44 |         return field;
45 |     }
46 | 
47 |     public String getRelationshipName() {
48 |         return relationshipName;
49 |     }
50 | 
51 |     public String getChildSObject() {
52 |         return childSObject;
53 |     }
54 | 
55 |     public boolean isDeprecatedAndHidden() {
56 |         return deprecatedAndHidden;
57 |     }
58 | 
59 |     public void setDeprecatedAndHidden(boolean deprecatedAndHidden) {
60 |         this.deprecatedAndHidden = deprecatedAndHidden;
61 |     }
62 | 
63 |     public boolean isCascadeDelete() {
64 |         return cascadeDelete;
65 |     }
66 | 
67 |     public void setCascadeDelete(boolean cascadeDelete) {
68 |         this.cascadeDelete = cascadeDelete;
69 |     }
70 | 
71 |     public boolean isRestrictedDelete() {
72 |         return restrictedDelete;
73 |     }
74 | 
75 |     public void setRestrictedDelete(boolean restrictedDelete) {
76 |         this.restrictedDelete = restrictedDelete;
77 |     }
78 | 
79 | }
80 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/ResultItem.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.io.Serializable;
19 | import java.util.HashMap;
20 | import java.util.Map;
21 | 
22 | /**
23 |  * @author Umut Utkan
24 |  */
25 | public class ResultItem implements Serializable {
26 | 
27 |     private String type;
28 | 
29 |     private String url;
30 | 
31 |     private Map attributes;
32 | 
33 | 
34 |     public ResultItem(String type, String url) {
35 |         this.type = type;
36 |         this.url = url;
37 |         this.attributes = new HashMap();
38 |     }
39 | 
40 | 
41 |     public String getType() {
42 |         return this.type;
43 |     }
44 | 
45 |     public void setType(String type) {
46 |         this.type = type;
47 |     }
48 | 
49 |     public String getUrl() {
50 |         return this.url;
51 |     }
52 | 
53 |     public void setUrl(String url) {
54 |         this.url = url;
55 |     }
56 | 
57 |     public Map getAttributes() {
58 |         return attributes;
59 |     }
60 | 
61 |     public void setAttributes(Map attributes) {
62 |         this.attributes = attributes;
63 |     }
64 | 
65 | }
66 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/SObjectDetail.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.util.List;
19 | 
20 | /**
21 |  * @author Umut Utkan
22 |  */
23 | public class SObjectDetail extends SObjectSummary {
24 | 
25 |     private List fields;
26 | 
27 |     private List childRelationships;
28 | 
29 |     private boolean listviewable;
30 | 
31 |     private boolean lookupLayoutable;
32 | 
33 |     private List recordTypeInfos;
34 | 
35 |     private boolean searchLayoutable;
36 | 
37 | 
38 |     public SObjectDetail() {
39 | 
40 |     }
41 | 
42 | 
43 |     public List getFields() {
44 |         return fields;
45 |     }
46 | 
47 |     public void setFields(List fields) {
48 |         this.fields = fields;
49 |     }
50 | 
51 |     public List getChildRelationships() {
52 |         return childRelationships;
53 |     }
54 | 
55 |     public void setChildRelationships(List childRelationships) {
56 |         this.childRelationships = childRelationships;
57 |     }
58 | 
59 |     public boolean isListviewable() {
60 |         return listviewable;
61 |     }
62 | 
63 |     public void setListviewable(boolean listviewable) {
64 |         this.listviewable = listviewable;
65 |     }
66 | 
67 |     public boolean isLookupLayoutable() {
68 |         return lookupLayoutable;
69 |     }
70 | 
71 |     public void setLookupLayoutable(boolean lookupLayoutable) {
72 |         this.lookupLayoutable = lookupLayoutable;
73 |     }
74 | 
75 |     public List getRecordTypeInfos() {
76 |         return recordTypeInfos;
77 |     }
78 | 
79 |     public void setRecordTypeInfos(List recordTypeInfos) {
80 |         this.recordTypeInfos = recordTypeInfos;
81 |     }
82 | 
83 |     public boolean isSearchLayoutable() {
84 |         return searchLayoutable;
85 |     }
86 | 
87 |     public void setSearchLayoutable(boolean searchLayoutable) {
88 |         this.searchLayoutable = searchLayoutable;
89 |     }
90 | 
91 | }
92 | 
--------------------------------------------------------------------------------
/src/main/java/org/springframework/social/salesforce/api/SObjectOperations.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Copyright (C) 2016 https://github.com/jottley/spring-social-salesforce
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  *         http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | package org.springframework.social.salesforce.api;
17 | 
18 | import java.io.InputStream;
19 | import java.util.List;
20 | import java.util.Map;
21 | 
22 | /**
23 |  * Defines operations for interacting with the sObjects API.
24 |  *
25 |  * @author Umut Utkan
26 |  */
27 | public interface SObjectOperations {
28 | 
29 |     public List