creating a filter using the gdata java client library and email settings api - google-email-settings-api

This is my first time with google apis and I am having trouble implementing the email settings api in eclipse .Please tell me exactly which jar files are to be included and how ? I am getting GmailSettingsService class not found error.Please Help
Thank you

From here:
Didn't you ever want some kind of tool to create new Google Data projects in seconds? Google Data Java Client Eclipse
Plug-in is now available for use.
Using this plug-in you can create a new Java project to interact with
any Google Data API of your choice. Now, you don't need to worry about
setting up the dependencies for your Google Data project. This plug-in
handles all the dependencies and also provides you with an option to
download the external dependencies. It also creates a boiler plate
code to interact with the API that you are interested in. This will
give a quick start to all the newbies.

Related

Not able to download metadata for application in force.com IDE

I am facing a few problems when trying to integrate the force.com ide with salesforce.com.
Currently i am using eclipse(4.22 Juno) and have installed the plugin Force.com IDE(2.9) and have a developers version in salesforce.com. I was able to successfully connect to salesforce without any errors thru force.com ide, by creating a new application with the name of the application that i have created in the web version.
Right now the application is created with the sub folders classes, triggers etc... but they are empty. I also tried setting the proxy in the connections of eclipse. But even that does not seem to work.
Does anybody have any idea what could be wrong.
Thanks--
Can you post the content of your package.xml file? It's kind of project definition, it contains info which files (objects, classes, pages, reports, profiles...) you want to download & push changes to.
Check http://wiki.developerforce.com/page/An_Introduction_to_Force.com_Metadata for example - have you skipped step similar to this?

An API for creating and managing Google Cloud Console projects?

I believe there is an undocumented Google API available to create and manage Google Cloud Console (and App Engine) projects on behalf of third party users.
Does anyone know how to use it?
I think older versions of the Google Eclipse Plugin obtained an OAuth2 token in the (undocumented) scope https://www.googleapis.com/auth/appengine.admin, and this allowed it to generate a Cloud Console project on your behalf. The latest version doesn't seem to do this. App Engine's own appcfg.py also uses this scope, but doesn't seem to do much more than deploy the code - I'm looking to change core settings for the project, such as Name, Redirect URLs, and Web Origins.
Any information would be appreciated.
I maintain a WordPress plugin providing secure Google Apps Login for end users, and currently have to give detailed instructions to admins for creating a new Cloud Console project manually, and entering settings such as Redirect URL. Ideally, I would create a simple on-line service to do all of this for them.
Thank you!
It is possible to programmatically create a new Developer Console project on behalf of a Google Account (yes, you read that right). You do so in a very roundabout way:
Request the https://www.googleapis.com/auth/drive.scripts scope from the user (standard OAuth 2.0 flow).
Use the Drive API's drive.insert method to create a new file with a mimetype of application/vnd.google-apps.script.
Somehow try to get the project ID, maybe by uploading some Apps Script code? This is the part that I was never able to figure out.
A little known fact is that every Google Apps Script project has a hidden Developer Console project associated with it. This project is not shown in the list of projects, but it does exist. It is created automatically when the user starts a new Apps Script project, and the drive.insert method is enough to cause this to happen.
How do you get to the hidden project? Well, the only way I know of is to open the Apps Script project from the Drive website, open the "Resources > Advanced Google Services" dialog, and click the link to the Developer Console. You'll find the project ID in the URL.
Aside from not being shown in your list of projects and not being able to use App Engine, this is a normal Developer Console project. You can add additional OAuth client credentials, service accounts, Compute Engine instances, etc. And of course once you have a project ID, all of the various management APIs will work: creating new virtual machines, making use of a service account's impersonation ability, etc.

Cleaning Google App Engine project in Eclipse

I have a dumb question.
Do you know if cleaning a google app engine project in eclipse also generates the cloud endpoint client library ? or i have to generate it seperately ? Its just that every change im doing to an endpoint's signature takes forever to build and im wondering if im just doing the same thing twice.
Performing a clean does in fact generate the cloud endpoint client library if you have "Build Automatically" selected.
We need to change the behavior so that the regeneration is not done automatically, but lets the user know that the client libraries are out-of-date and gives them the option to update them.

How to manage asymmetric keys without checking them into source control?

I have a google app engine application which needs to be given a public-private key pair. I don't want to check this into source control because it will be accessible by too many people. Since this is GAE I can't use the build system to write the keys to the file system of the server.
Is there a known best practice for this?
My first thought was does Jenkins provide a way to manage keys securely? I know I can just copy the keys to a location on the jenkins server and copy them into the build but this project will be used by third party teams so I need to provide a UI based solution in jenkins. I did not find any relevant plugin but I would like to make sure there isn't a better way before writing my own.
There are of course several approaches to this. I believe certificates are a concern of admins, not developers.
What we do is have custom admin pages where we upload certificates to blobstore under separate namespace. Then we have an internal "service" (just a simple factory) so that other pieces of code can retrieve certs.
If you are happy to use a cloud based Jenkins, we (CloudBees) have an oauth based solution at appengine.cloudbees.com
You could roll your own. It is not excessively tricky. You will need to
Register with google's api console to get a client key and secret and define the endpoints that your app will show up as
Write some way if feeding those credentials to your Jenkins build. I would recommend using the credentials plugin
Either write a build wrapper that exposes the refresh token to your build (python sdk deployment) or exposes the access token (java sdk... Got to love that the two sdks do the same thing in different ways)
Or use our free service ;-)

How to design an extensible CMS for Google App Engine?

I am a fan of the extensibility of the CMSes. You can upload some code (usually PHP), authorize it from the CMS admin panel and it's running.
I wonder if it is possible in Google App Engine. I haven't checked the extensibility of existing CMSes for Google App Engine, but if there is any of them that supports plugins I would like to know how they did it, and whether they are JS plugins only, or if they support Python/Java plugins too.
Nick Johnson from Google wrote an entire blog post series on how to write a blog system for app engine. If it doesn't do what you want, I am sure that you can extend it but normally a blogging system is sufficient for a CMS for most people.
I don't have a public example to point to (sorry), but I can confirm that it is possible to create Python plugins for an App Engine project. I completed a project a few months ago that does something like this. The crux of the thing comes down to a single line of python:
exec plugincode in someDict
Above 'plugincode' is a string containing some python code to execute, and someDict is a dictionary of globals to execute it in. This is arguably cleaner than using eval(). In our case the globals dictionary contained an instance of an object that the plugincode used to communicate with the system. I can't think of any major limitations with this (or similar) approaches. e.g. plugincode could declare a class, and register an instance of that class as a callback handler etc etc.
In our case we stored the plugin code in the Data Store, and loaded it at appropriate times (e.g. when an instance of the app is started).
Actually I see no conceptual problem with supporting plugins in App Engine application. For example on Java you may fetch plugin jar to memory from data store or memcache (on application initialization phase), and then use custom class loader to load plugin classes as needed). Actually you even may load classes from request data and evaluate them on the fly if needed (how we do it in AppWrench Java console).
Regards,
Pavel.

Resources