Skip to content

Conversation

fmancinelli
Copy link
Contributor

I wrote an extension of the REST API for creating wikis and importing XARs in existing wikis.

This is the pull request for code review.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this one is a bit misleading since the template is not part of what is called the wiki descriptor on wiki side and is just used when creating the wiki.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I see.

WikiDescriptor was just a name I came up with for sending a "representation describing the wiki the user wants to create"
I also thought about WikiCreationRequest or WikiCreationData.

I don't really know what is better. If you have a preference let me know and we'll change the name in the model.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some other ideas:

  • remove this object from the model and let the user of the REST API send a Wiki object (we need to add missing information in the Wiki object which should be done anyway) and a URL parameter for the template which is pretty much what we have in the wikimanager API
  • pretty much the same thing but really introduce the template information in the wiki descriptor and make wiki manager indicate it when creating a wiki from a template (which is something I remember seeing someone asking for)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could go with the first option and migrate to the second when the template information will be available.

So AFAIU we will need to add to the wiki object in the model the following information:

  • Owner
  • Pretty name
  • Description

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe add:

  • Aliases (a list of strings containing all the alias used to access the wiki in domain or path based multiwiki)

There is other stuff that are a bit less important (not used much and even less from REST):

  • Secure (indicate if URLs should be forced as https)
  • Home page
  • Template (indicate of the wiki should be listed as available wiki template)

The template to be used is optionally passed via query parameters.
@fmancinelli
Copy link
Contributor Author

I committed the suggested changes:

  • Reuse of the Wiki model object for posting creation requests.
  • Passing the (optional) template to be used via query parameters.

@tmortagne
Copy link
Member

Would be nice if you could also retry without the workaround for XWIKI-8119 now that it's fixed.

@fmancinelli
Copy link
Contributor Author

It works ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipped this before but the "issue" here is that you make application-manager and wiki-manager plugins part of XE which they are not right now. This might require a vote.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...Which doesn't sound as a good idea anyway because AFAIU we would like to get rid of plugin.

Maybe creating a component for managing wikis (i.e., provide a subset of what wikimanger does) could be an interesting alternative.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not really talking about plugin technology, it's not like you are introducing a new plugin here and of course at some point we will convert wikimanager plugin into a component. My point is more that this module is currently not used in XE which is why it's only included in XEM.

So my concerne is just, is it ok to emmbed wiki management module in XE instead of just XEM (it is OK for me but I think it require a vote).

@ghost ghost assigned fmancinelli Oct 12, 2012
@fmancinelli fmancinelli closed this Nov 4, 2012
@fmancinelli
Copy link
Contributor Author

This pull request is obsolete.

XWIKI-8120 and XWIKI-7076 have been implemented and merged following a more correct approach.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants