Spring-Data-Rest allow us to publish automatiquely all declared Repositories,
suppose we have a DataBase of 500 entites, and we want to have the same result but without creating manualy a Repository for every entity,
how to do that?
The repositories are a core part of how spring-data-rest works, so I don't think there is a way around creating repositories. Some databases support a direct REST API of their schema, you may want to look there.
Related
Is there a way to view repository traffic for all repositories on your account at the same time? (without creating your own custom dashboard using the Github API). It would be very convenient. I suspect a bash script might do this without too much effort (e.g. get all repo names, get the traffic/stars stats for each repo in the list). But I want to be sure something obvious doesn't already exist before writing anything myself
I am not ware of any native dashboard that would aggregate multiple GitHub repositories into one convenient view.
You would therefore have to rely on third-party scripts, such as, for example, nchah/github-traffic-stats (Python)
Get statistics on web traffic to your GitHub repositories.
Since it is limited to the last two weeks, you might have to record those statitics over time (example: Microsoft/GitHubTelemetryParsor)
We are currently having a project collection with backlogs, sprints, etc. in an Azure DevOps account. There is another organization with completely different credentials to log in that we'd like to transfer this project collection to the other organization. I could not find any features or approaches to complete this transfer. Is there a way to be able to achieve this goal?
There is no way to migrate a project between organisations. This may become possible in the future, but the feature suggestion is 8 years old and hasn't seen progress, yet.
However, depending on your requirements, you might be able to create your own tools/scripts to "re-create" your project in the new organisation using the REST API.
the TYPO3 documentation here https://docs.typo3.org/typo3cms/ExtbaseFluidBook/6-Persistence/4-use-foreign-data-sources.html says, it is possible to use external data sources for extbase objects: "These foreign data sources could be tables from the same TYPO3 database or a web service."
The used data mapper allows at least to map objects to any table within the same MySQL database.
I am interested in this "or a web service" part. How to configure the data/property mapper to fetch and store an extbase model from an external web service (e.g. REST)?
Is it already possible with TYPO3 core? If not, does anyone know an extension which such capabillities?
You are looking at very old documentation there. Although this is still valid to learn Extbase concepts, I would not recommend the ExtbaseFluidBook for hardcore-details any more. I suppose the claim you quote reflects more of a wish or a slight possibility, not a reality. I am not aware of anybody having gone that route yet.
If I wanted to make an external source look "Extbasey", I would implement a repository and models but just use own logic to select and persist.
Side note: Typo3 v8 integrated doctrine, but only working with records, not objects (-dbal, not -orm): https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Database/Introduction/Index.html - this is used more and more in the core and in extensions. It might be feasible to include doctrine-orm and a doctrine-REST-backend like https://packagist.org/packages/circle/doctrine-rest-driver.
I am using github to share a set of SPARQL queries:
http://www.boisvert.me.uk/opendata/sparql_aq+.html?file=specific%20sensor.txt
Currently the simple work allows end-users to access queries stored on the github repository, but ultimately I want to allow them to also modify the queries, as with a pastebin, and make use of the repository to better manage the shared system. Ideally I would want end-users who may not be very tech-savvy, to be able to make minor changes to queries to an open, linked data endpoint: so to keep the technology barrier low.
My problem is this: how best to structure the github project and exploit the API to make the most of the available information? I can think of different points:
Currently the project (https://github.com/boisvert/unshaql) holds client code and example queries. Does it make a difference to create an independent project (separate from the web client code) for SPARQL queries?
I would use directories within the project to classify/tag queries, and file names to title them. Are there better alternatives? It strikes me that a hierarchical structure is not a good fit to tags.
When end-users save, a simpler (and cruder) option is to allow them to push their file into just one branch, which holds the examples. A better engineered one would be to allow them to use their github credentials to fork the set of SPARQL queries and edit theirs, but with unaware users, how do I avoid creating a mess?
I think that a rigular Github repository is a rather bad fit for this kind of content. If your users have a GitHub account, you should probably use Gists instead: https://help.github.com/articles/about-gists/ I never used this myself, but it seems perfectly adapted to what you are planning. Your site could become a DB of tags over user-provided gists. That would however lock you into GitHub-specific solutions.
Even if you go for a regular repository, you should not allow the users to commit into the repository hosting your code: that would be a serious security hazard as you won't be able to control the parts of the repository to which they are allowed to commit.
If you setup two repositories, it's rather easy to have the code of a webpage in a repository, and the code automatically commited in another repository (under an anonymous identity so that your users don't have to create a github account).
Also, note that the oauth token should never be stored in a public repository (or the GitHub robots will invalidate it in a matter of hours).
See Hiding GitHub token in .gitconfig for a solution to this sub-problem.
I'm working on a project that keeps some access control information in the database. We're using that access control information to filter what the user can see. The filter that we're using is based on roles that the user has. We would like to use the Repository abstraction provided by Spring Data, but we would like to be able to adjust the generated queries before they are executed. Is there a way to attach a listener or an interceptor that will be called before a query is executed? That way we can get a reference to the query object and make whatever adjustments to the query we need to before the query is executed.
What we're thinking about doing is creating our own JpaRepositoryFactoryBean so we can override SimpleJpaRepository as described here. We would override SimpleJpaRepository.getQuery to make adjustments to the query. Then for all the generated finder methods we were thinking about extending PartTreeJpaQuery and overriding the PartTreeJpaQuery$QueryPreparer. In the QueryPreparer we would override QueryPreparer.createQuery methods. We weren't sure if that was the simplest way to get access to all queries before they get executed.
We thought about adding a org.springframework.data.repository.core.support.QueryCreationListener, but it would only get executed when the query is created. I think we need something more dynamic.
I'm not sure if you already know, but Spring Data team is working on that feature for the next release, to make it possible for Spring Security Team to add the support for ACLs then.
Add infrastructure for generic query augmentation
Spring Security issue that is blocked by the previous: Spring Security / Spring Data Acl Integration
In my company, we created a JpaRepositoryFactoryBean that would create a custom Repository to allow us to add the filter for the ACLs, but we just did that for the findAll and findOne methods, so we were loosing a lot of features of Spring Data and decided to revert that change and we're still thinking in a way to do it automatically. If we find out that it'll be too difficult, I think that we'll delegate that responsibility on the clients of the repositories and wait for the support for it in Spring Security/Data.
The original question already has 1 year. Did you find a clean way to do it?