Package org.fluxtream.core.domain

Examples of org.fluxtream.core.domain.ApiKey$PermanentFailReason


    private void addDefaultWidgets(final long guestId, Dashboard dashboard) {
        List<ApiKey> keys = guestService.getApiKeys(guestId);
        Iterator<ApiKey> eachKey = keys.iterator();
        List<String> widgetNames = new ArrayList<String>();
        while (eachKey.hasNext()) {
            ApiKey key = eachKey.next();
            if(key!=null && key.getConnector()!=null && key.getConnector().getName()!=null) {
                String defaultWidgetKey = key.getConnector().getName() + ".defaultWidget";
                String widgetName = widgetProperties.getString(defaultWidgetKey);
                if (widgetName!=null) {
                    widgetNames.add(widgetName);
                }
            }
View Full Code Here


                    }
                }
            }
        }
        else {
            final ApiKey apiKey = findConnectorApiKeyByPrettyName(guestId, connectorPrettyName);
            if (apiKey != null && apiKey.getConnector() != null) {
                final Connector connector = apiKey.getConnector();
                final ObjectType desiredObjectType = findObjectTypeByName(connector, objectTypeName);

                if (desiredObjectType == null) {
                    final Map<ObjectType, List<AbstractFacet>> facetsByObjectType = facetFinderStrategy.find(apiKey, tagFilter);
                    if ((facetsByObjectType != null) && (!facetsByObjectType.isEmpty())) {
View Full Code Here

    @Secured({ "ROLE_ADMIN" })
    @RequestMapping("/admin/{guestId}/{apiKeyId}/{objectTypes}/historyUpdate")
    public ModelAndView forceConnectorInstanceHistoryUpdate(@PathVariable("guestId") long guestId,
                                                            @PathVariable("apiKeyId") long apiKeyId,
                                                            @PathVariable("objectTypes") int objectTypes) {
        final ApiKey apiKey = guestService.getApiKey(apiKeyId);
        connectorUpdateService.updateConnectorObjectType(apiKey, objectTypes, true, true);
        return new ModelAndView(String.format("redirect:/admin/%s/%s", guestId, apiKeyId));
    }
View Full Code Here

    @Secured({ "ROLE_ADMIN" })
    @RequestMapping("/admin/{guestId}/{apiKeyId}/{objectTypes}/refresh")
    public ModelAndView refreshConnectorInstance(@PathVariable("guestId") long guestId,
                                                 @PathVariable("apiKeyId") long apiKeyId,
                                                 @PathVariable("objectTypes") int objectTypes) {
        final ApiKey apiKey = guestService.getApiKey(apiKeyId);
        connectorUpdateService.updateConnectorObjectType(apiKey, objectTypes, true, false);
        return new ModelAndView(String.format("redirect:/admin/%s/%s", guestId, apiKeyId));
    }
View Full Code Here

                                     @PathVariable("UID") Long uid) throws IOException, UnexpectedHttpResponseCodeException {
        if (!checkForPermissionAccess(uid)){
            uid = null;
        }
        // TODO: this is really going to be problematic...
        ApiKey apiKey = guestService.getApiKey(uid, Connector.getConnector("bodytrack"));
        String user_id = guestService.getApiKeyAttribute(apiKey, "user_id");
        String bodyTrackUrl = "http://localhost:3000/users/" + user_id + "/log_items/get";
        String pstr = request.getQueryString();
        if (pstr != null) {
            bodyTrackUrl += "?" + pstr;
View Full Code Here

      @PathVariable("Offset") String offset) throws IOException, UnexpectedHttpResponseCodeException {
        if (!checkForPermissionAccess(uid)){
            uid = null;
        }
        //TODO: WARNING!
        ApiKey apiKey = guestService.getApiKey(uid, Connector.getConnector("bodytrack"));
        String user_id = guestService.getApiKeyAttribute(apiKey, "user_id");
    String bodyTrackUrl = "http://localhost:3000/photos/" + user_id + "/"
        + level + "." + offset + ".json";
    String pstr = request.getQueryString();
    if (pstr != null) {
View Full Code Here

                                        @PathVariable("PhotoSpec") String photoSpec) throws IOException, UnexpectedHttpResponseCodeException {
        if (!checkForPermissionAccess(uid)){
            uid = null;
        }
        //TODO: WARNING!
        ApiKey apiKey = guestService.getApiKey(uid, Connector.getConnector("bodytrack"));
        String user_id = guestService.getApiKeyAttribute(apiKey, "user_id");
        String bodyTrackUrl = "http://localhost:3000/users/" + user_id + "/logphotos/" + photoSpec + ".jpg";
        String pstr = request.getQueryString();
        if (pstr != null) {
            bodyTrackUrl += "?" + pstr;
View Full Code Here

  public void bodyTrackSources(HttpServletResponse response,
      @PathVariable("UID") Long uid) throws IOException, UnexpectedHttpResponseCodeException {
        if (!checkForPermissionAccess(uid)){
            uid = null;
        }
        ApiKey apiKey = guestService.getApiKey(uid, Connector.getConnector("bodytrack"));
        String user_id = guestService.getApiKeyAttribute(apiKey, "user_id");
    String tunnelUrl = "http://localhost:3000/users/" + user_id + "/sources";
    writeTunnelResponse(tunnelUrl, response);
  }
View Full Code Here

          HttpServletRequest request, @PathVariable("UID") Long uid,
          @PathVariable("LOGREC_ID") String LOGREC_ID) throws IOException, UnexpectedHttpResponseCodeException {
        if (!checkForPermissionAccess(uid)){
            uid = null;
        }
        ApiKey apiKey = guestService.getApiKey(uid, Connector.getConnector("bodytrack"));
        String user_id = guestService.getApiKeyAttribute(apiKey, "user_id");
      String bodyTrackUrl = "http://localhost:3000/users/" + user_id + "/logrecs/" + LOGREC_ID + "/get";
      String pstr = request.getQueryString();
      if (pstr != null) {
        bodyTrackUrl += "?" + pstr;
View Full Code Here

        //   https://fluxtream.atlassian.net/wiki/display/FLX/BodyTrack+server+APIs#BodyTrackserverAPIs-usersUIDlogrecsLOGRECIDset
        // The params are all optional:
        //   comment=<string> Set the comment field to the provided string
        //   tags=<list of tags separated by commas> Set the tags for the logrec.  Behaves the same as /users/UID/tags/LOGREC_ID/set?tags=<value> other than having a different return value.
        //    nsfw=<value> If specified, alters the value of the NSFW flag on the logrec and modifies tag list appropriately to either include an "nsfw" tag if value is true, or remove any existing "nsfw" tags if value is false.
        ApiKey apiKey = guestService.getApiKey(uid, Connector.getConnector("bodytrack"));
        String user_id = guestService.getApiKeyAttribute(apiKey, "user_id");
        String bodyTrackUrl = "http://localhost:3000/users/" + user_id + "/logrecs/" + LOGREC_ID + "/set";
        Enumeration parameterNames = request.getParameterNames();
        Map<String,String> tunneledParameters = new HashMap<String,String>();
        while(parameterNames.hasMoreElements()) {
View Full Code Here

TOP

Related Classes of org.fluxtream.core.domain.ApiKey$PermanentFailReason

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.