GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Provide a .buildStorageService() method on the StorageServiceOptions class? · Issue #54 · googleapis/google-cloud-java

Provide a .buildStorageService() method on the StorageServiceOptions class? #54

New issue
Copy link
New issue
Copy link
Closed
Closed
Provide a .buildStorageService() method on the StorageServiceOptions class?#54
Copy link
Assignees
mziccard
Labels
api: storageIssues related to the Cloud Storage API.authtype: questionRequest for information or clarification. Not an issue.

Description

@jgeewax
jgeewax
opened on May 12, 2015
Issue body actions

Right now, to create a StorageService object, I need to do:

StorageServiceOptions options =  StorageServiceOptions.builder()
    .projectId("project")
    .build();
StorageService storage = StorageServiceFactory.instance().get(options);

Would it be worthwhile to do this as

StorageService storage =  StorageServiceOptions.builder()
    .projectId("project")
    .build().buildStorageService();

Or maybe we can have a StorageServiceBuilder?

StorageService storage = StorageService.builder()
    .projectId("project")
    .build();

Activity

Next
  1. jgeewax
    added
    type: questionRequest for information or clarification. Not an issue.
    auth
    api: storageIssues related to the Cloud Storage API.
    on May 12, 2015
  2. jgeewax
    added this to the This milestone has been deleted milestone on May 12, 2015
  3. jboynes commented on May 12, 2015

    @jboynes
    jboynes
    on May 12, 2015
    More actions

    It would nice if this worked with the standard injection mechanisms like @resource so that applications did not have to be concerned with all the configuration. For example:

    @Resource StorageService storageService;

    I think most applications typically interact only with a single bucket in which case injecting a reference to the bucket would be simpler. see #55

  4. jgeewax
    modified the milestones: This milestone has been deleted, This milestone has been deleted on Jun 1, 2015
  5. aozarov commented on Jun 1, 2015

    @aozarov
    aozarov
    on Jun 1, 2015
    Contributor
    More actions

    @jgeewax , I don't think this belongs in this milestone as as I think the answer for this API questions would benefit from a wider set of opinions.

  6. jgeewax commented on Jun 2, 2015

    @jgeewax
    jgeewax
    on Jun 2, 2015
    Author
    More actions

    @aozarov : Not sure what you're saying. It seems to me like this would be a really nice way to get a StorageService object. If we're all focused on usability, this seems like something to push out before making a bunch of broadcasts about the library being ready for others to dig into...

    Can you give any more background on why this wouldn't make the cut in your opinion ?

  7. aozarov commented on Jun 2, 2015

    @aozarov
    aozarov
    on Jun 2, 2015
    Contributor
    More actions

    I am saying that if the milestone "Needed for public announcement" is the things we must do before announcement I think this does not qualify (as it is more style issue) and I think I would like to get more feedback before doing it. I expect such feedback to come after we announce and this project gets more visibility.

  8. jgeewax commented on Jun 2, 2015

    @jgeewax
    jgeewax
    on Jun 2, 2015
    Author
    More actions

    I think this is a basic usability thing, that I'd consider table stakes for "a super usable Java library". Seems weird that we'd wait for people to complain rather than just adding the shortcut method. Do you think that the suggestion is "clearly more convenient" or "no difference" or "clearly less convenient"?

  9. aozarov commented on Jun 2, 2015

    @aozarov
    aozarov
    on Jun 2, 2015
    Contributor
    More actions

    I think current style is idiomatic and common. it is indeed slightly longer (though could still be a one liner).
    e.g.

    Storage storage = StorageFactory.instance().get(StorageOptions.defaultInstance());

    Having several ways to do the same thing is not necessarily better and I would like to get more opinions about it.
    Also, current way makes it easy to provide/inject different factory implementations.

  10. mziccard commented on Oct 27, 2015

    @mziccard
    mziccard
    on Oct 27, 2015
    Contributor
    More actions

    Closed with #296

  11. 11 remaining items

  12. github-actions
    added a commit that references this issue on Aug 9, 2022

    chore(main): release 0.3.2 (#58)

    272bc1b
  13. github-actions
    added 2 commits that reference this issue on Sep 15, 2022

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    63e56e2

    chore(main): release 0.2.4-SNAPSHOT (#54)

    da919ea
  14. github-actions
    added 4 commits that reference this issue on Oct 4, 2022

    chore(main): release 0.2.3 (#55)

    5a6bae9

    chore(main): release 0.3.1 (#40)

    e7756bf

    chore(main): release 0.1.6-SNAPSHOT (#54)

    5ebcc32

    chore(main): release 0.4.0 (#52)

    6de8e6b
  15. meltsufin
    added a commit that references this issue on Dec 22, 2025

    deps: update core dependencies (#54)

    9ae3410
  16. chingor13
    added a commit that references this issue on Jan 6, 2026

    chore: enable context aware commits (#54)

    0d436ef
  17. suztomo
    added a commit that references this issue on Mar 11, 2026

    deps: update core dependencies (googleapis#54)

    79d716f
  18. suztomo
    added a commit that references this issue on Mar 30, 2026

    samples(deps): update Guava (#54)

    a6aa054
  19. lqiu96
    added a commit that references this issue on Apr 1, 2026

    samples(deps): update Guava (#54)

    78bd86c
  20. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    chore: release 1.102.2-SNAPSHOT (#54)

    ab28fda

    chore: release 1.102.2-SNAPSHOT (#54)

    e12328c
  21. benjaminp
    added a commit that references this issue on Jul 13, 2026

    Removing outdated message about being 0.y.z (googleapis#54)

    445287b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

api: storageIssues related to the Cloud Storage API.authtype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.