Re: [xwiki-users] xWiki RESTful/HTTP Connection

2016-04-17 Thread Mohamed Boussaa
Hi,

You can use the new version of Apache's HTTP library, as follows, hope
it'll help you.

public class RestTest {
   /**
   * Create and initialize the http client.
   *
   * @return an HttpClient object
   */
   HttpClient getClient(host, port, username, password) {
  HttpClient httpClient = new HttpClient();
  httpClient.getParams().setAuthenticationPreemptive(true);
  httpClient.getState().setCredentials(
 new AuthScope(host, port, AuthScope.ANY_REALM),
 new UsernamePasswordCredentials(username, password)
  );
  return httpClient;
   }

   public static void main(String[] args) throws IOException {
 // Get request example
  HttpClient httpClient = getClient(yourHost, yourPort, yourUsername,
yourPassword);
  GetMethod getMethod = new GetMethod(getURL);
  getMethod.addRequestHeader("Accept", "application/json");
  getMethod.setDoAuthentication( true );
  String getURL = "your get url";
  try {
  int status = httpClient.executeMethod(getMethod);
 System.out.println(getMethod.getResponseBodyAsString());
   } catch (Exception e) {
 //...
  } finally {
  // release any connection resources used by the method
  getMethod.releaseConnection();
   }

  // Put request example
  String putURL = "your put url";
  PutMethod putMethod = new PutMethod(putURL);
putMethod.addRequestHeader("Accept", "application/json");
putMethod.setDoAuthentication( true );
try {
   int status = httpClient.executeMethod(putMethod);
  System.out.println(putMethod.getResponseBodyAsString());
} catch (Exception e) {
   // ...
  } finally {
   // release any connection resources used by the method
  putMethod.releaseConnection();
}
  }
}




Best regards,
Mohamed.

On Sun, Apr 17, 2016 at 9:24 PM, Mohamed Boussaa <mohamed.bous...@xwiki.com>
wrote:

> Hi,
>
> You can use the new version of Apache's HTTP library, as follows, hope
> it'll help you.
>
> public class RestTest {
>/**
>* Create and initialize the http client.
>*
>* @return an HttpClient object
>*/
>HttpClient getClient(host, port, username, password) {
>   HttpClient httpClient = new HttpClient();
>   httpClient.getParams().setAuthenticationPreemptive(true);
>   httpClient.getState().setCredentials(
>  new AuthScope(host, port, AuthScope.ANY_REALM),
>  new UsernamePasswordCredentials(username, password)
>   );
>   return httpClient;
>}
>
>public static void main(String[] args) throws IOException {
>  // Get request example
>   HttpClient httpClient = getClient(yourHost, yourPort, yourUsername,
> yourPassword);
>   GetMethod getMethod = new GetMethod(getURL);
>   getMethod.addRequestHeader("Accept", "application/json");
>   getMethod.setDoAuthentication( true );
>   String getURL = "your get url";
>   try {
>   int status = httpClient.executeMethod(getMethod);
>  System.out.println(getMethod.getResponseBodyAsString());
>} catch (Exception e) {
> //...
>   } finally {
>   // release any connection resources used by the method
>   getMethod.releaseConnection();
>}
>
>   // Put request example
>   String putURL = "your put url";
>   PutMethod putMethod = new PutMethod(putURL);
> putMethod.addRequestHeader("Accept", "application/json");
> putMethod.setDoAuthentication( true );
> try {
>int status = httpClient.executeMethod(putMethod);
>   System.out.println(putMethod.getResponseBodyAsString());
> } catch (Exception e) {
>// ...
>   } finally {
>// release any connection resources used by the method
>   putMethod.releaseConnection();
> }
>   }
> }
>
>
>
>
> Best regards,
> Mohamed.
>
> On Sun, Apr 17, 2016 at 7:25 PM, Tobi <gman...@yandex.ru> wrote:
>
>> Hello,
>>
>> I was trying to write a program which would upload new pages on my wiki. I
>> was following these instructions
>> http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI , but
>> unfortunately most of the examples use old version of Apache's HTTP
>> library,
>> so they are not very useful for me.
>>
>> So I decided to try writing a program by following Apache's examples, but
>> when I was testing connectivity I realised that I can't even get access to
>> admin-only pages.
>>
>> Here's my code:
>>
>> import java.io.IOException;
>> import org.apache.http.auth.AuthScope;
>> import org.apache.http.auth.UsernamePasswordCredentials;
>> import org.apache.http.client.CredentialsProvi

Re: [xwiki-users] XWiki Button with ActionListener?

2016-04-18 Thread Mohamed Boussaa
Hello,

Here is the XWiki Developer's Guide:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/


Regards,
Mohamed.

On Mon, Apr 18, 2016 at 1:28 PM, Rochlin Oleg  wrote:

> Hello my fellow XWIKI-people.
> I would like to create a button to generate some content.
>
> Pseudo-code example
>
> {{velocity}}
>
> #set(button=false)
>
> Click this Button causes #set(button=true)
>
> #if($button)
>
> script starts
>
> #end
>
> {{/velocity}}
>
> Any ideas? I am pretty new to WIKI
>
> Mit freundlichen Grüßen / Best regards
>
> Oleg Rochlin | Werkstudent | System implementation
> SSI SCHÄFER | SSI Schäfer Noell GmbH | i_Park Klingholz 18/19 | 97232
> Giebelstadt | Germany
>
> oleg.roch...@ssi-schaefer.com
>
> Website | Blog<
> http://www.ssi-schaefer.de/blog> | YouTube<
> http://youtube.com/lagerlogistik1> | Facebook<
> http://facebook.com/SSI.SCHAEFER.DE>
>
>
> SSI Schäfer Noell GmbH | 97232 Giebelstadt | Germany
> Incorporated in Würzburg | Commercial Register B 6936 | VAT no. DE170860279
> Managing Directors: Rudolf Keller, Henricus Swinkels
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] xWiki RESTful/HTTP Connection

2016-04-18 Thread Mohamed Boussaa
Hi,

I forget to add the packages to import in my previous code.

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.NameValuePair;


Find the API of the PutMethod here:
https://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/methods/PutMethod.html



Regards,
Mohamed.




On Sun, Apr 17, 2016 at 10:02 PM, Tobi  wrote:

> Thank you for your response!
>
> As far as I know there is no PutMethod (which you use in your code) class
> in
> new versions of Apache's HTTP library. Same goes for many other methods
> which.
>
> Or maybe I'm just missing the point and there IS a library with required
> Classes and Methods of which I know nothing about (if it's true then I
> would
> be really grateful if your provide me a link).
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/xWiki-RESTful-HTTP-Connection-tp7599026p7599028.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Carousel Slider

2017-01-23 Thread Mohamed Boussaa
You can also use the Bootstrap Carousel Plugin inside xwiki pages,  all you
have to do is to copy the html code of the bootstrap slider inside an html
macro as below:

{{html}}


  
  



  

  
  

  
  
...
  


  
  
...
  

...
  

  
  

Previous
  
  

Next
  

{{/html}}

Find boostrap slider plugin documentation here:
https://getbootstrap.com/javascript/#carousel



Mohamed

On Mon, Jan 23, 2017 at 9:43 AM, Mohamed Boussaa <mohamed.bous...@xwiki.com>
wrote:

> Hello,
>
> You can try to install and use the XCarousel application, find détails
> here: http://extensions.xwiki.org/xwiki/bin/view/Extension/XCarousel/
>
> Regards,
> Mohamed
>
>
>
> On Mon, Jan 23, 2017 at 3:24 AM, WikiNote Org <thewikinote...@gmail.com>
> wrote:
>
>> I want to implement Carousel slider just as the one on
>> xwiki.org/xwiki/bin/view/Carousel/Slider
>> But I dont know how to do it.
>> I tried Totem extension. Its good but has 1 problem. In its Carousel
>> implementation, Totem uses only images attached and doesnt show the
>> description.
>> Is their any other way around? I want the slider exactly as on xwiki.org
>> Perhaps, it should be well documented as it is the most important
>> component
>> for Home pages.
>>
>> Thank you in advance
>>
>
>


Re: [xwiki-users] Carousel Slider

2017-01-23 Thread Mohamed Boussaa
Hello,

You can try to install and use the XCarousel application, find détails
here: http://extensions.xwiki.org/xwiki/bin/view/Extension/XCarousel/

Regards,
Mohamed



On Mon, Jan 23, 2017 at 3:24 AM, WikiNote Org 
wrote:

> I want to implement Carousel slider just as the one on
> xwiki.org/xwiki/bin/view/Carousel/Slider
> But I dont know how to do it.
> I tried Totem extension. Its good but has 1 problem. In its Carousel
> implementation, Totem uses only images attached and doesnt show the
> description.
> Is their any other way around? I want the slider exactly as on xwiki.org
> Perhaps, it should be well documented as it is the most important component
> for Home pages.
>
> Thank you in advance
>


Re: [xwiki-users] Jira Scripting API

2017-01-23 Thread Mohamed Boussaa
Hi,

Find more details here:

http://extensions.xwiki.org/xwiki/bin/view/Extension/JIRA+Macro
http://www.xwiki.com/en/Blog/WorkingWithJiraXWiki
http://snippets.xwiki.org/xwiki/bin/view/Extension/JIRA+Integration


Mohamed

On Mon, Jan 23, 2017 at 6:52 PM,  wrote:

> Hi,
> I’m trying to use the Searchjql function to read data from our Jira server
> via the scripting api.
> The Jira api allows to read any existing field, but I don’t understand how
> this can be done via the scripting api.
> The second question I have is how to make a Json file out the answer which
> can be fed into a livetable.
>
> There is also one issue I have. We have set up access to our jira server
> by password protected accounts only. If you have a pssword which contains a
> “$“ the api fails.
> Any help is welcome.
>
> Thanks, Wolfgang
>


Re: [xwiki-users] 8.4.4: Totally Private Wiki?

2017-01-27 Thread Mohamed Boussaa
Hi,

After googling a little bit I found 2 discussions in the xwiki mailing
lists, It describes a need similar to yours. Hope it will help.

http://lists.xwiki.org/pipermail/users/2005-December/000713.html
http://xwiki.475771.n2.nabble.com/how-to-approve-new-xwiki-users-td502460.html




Regards,
Mohamed

On Fri, Jan 27, 2017 at 6:30 AM, Craig Wright  wrote:

> Howdy,
>
> Is it possible to setup an XWiki such that:
>
> - Users can register AND validate email.
> - After registration, users who have not been “approved” can only see one
> page that says “Please wait for approval for access to this wiki."
> - Approved users have normal access controls.
>
> Right now I have removed all rights from the XWikiAllGroup and I manually
> move users into the XWikiRegisteredUsers group (maybe a bad name since all
> users are registered, it just means I approved them for access). The only
> problem with this setup is that new users cannot validate their email until
> I have added them to the XWikiRegisteredUsers group. I have not yet figured
> out how to control access to that special Email Authorization page.
>
>  Thanks for any info!
> Craig


Re: [xwiki-users] Small attachments in DB, big ones in files?

2017-02-10 Thread Mohamed Boussaa
Hello,

XWiki offers the possibility to store your attachments in the database or
directly in the file system.

See more details in this link:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments#HAttachmentStorage

Regards,
Mohamed

On Fri, Feb 10, 2017 at 8:34 PM, Lilianne E. Blaze <
lilia...@lilianne-blaze.net> wrote:

> Hello,
> Is it possible to store attachments below a certain size inside a
> database, while storing bigger ones in files?
>
> I assume when using HSQL database it is usually preferred to store
> attachments in files?
>
> Greetings, Lilianne
>


Re: [xwiki-users] How to export a wrokspace from older xwiki and import it to newer xwiki 8.2.1

2017-01-11 Thread Mohamed Boussaa
Hello,

You can find more details on upgrading wiki documents in this page
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Upgrade#HUpgradingwikidocuments


Regards,
Mohamed

On Wed, Jan 11, 2017 at 10:27 AM, Thomas Mortagne  wrote:

> Export/Import pages is usually not a very good way to upgrade.
>
> Best is to change the WAR files in existing setup and let XWiki
> automatically migrate what needs to be migrated. This includes
> migrating old workspaces to wikis.
>
> On Wed, Jan 11, 2017 at 10:16 AM, Kumar, Piyush 
> wrote:
> > Hi All,
> >
> >
> > In our existing Xwiki application for each Xwiki a workspace is getting
> created. WE are now migrating to the new version 8.2.1 and wanted to export
> whole workspace of a created xwiki and reimport it to newer version.
> >
> > While import it displays below directories to select files to import:
> >
> > AnnotationCode
> > AppWithinMinutes
> > Bolg
> > ColorThemes
> > Dashboard
> > Extensions
> > Faq
> > Invitation
> > Main
> > News
> > Panels
> > Sandbox
> > Scheduler
> > Stats
> > Xwiki
> >
> > I am selecting all the directory and importing it but the pages are not
> coming proper.
> > Please suggest if in above directories I should unselect some of them
> which may override on the newer xwiki 8.2.1 instance.
> >
> > Please suggest if some other reason could be the problem.
> >
> >
> > Thanks & Regards,
> > Piyush
> >
>
>
>
> --
> Thomas Mortagne
>


Re: [xwiki-users] Categorization of pages; tags?

2016-12-29 Thread Mohamed Boussaa
Hello novnovice,

I do not fully understand your need, but if you want to categorize wiki
pages there is mutiple ways to do that:

1) You can use nested spaces, each top level page can be considered as a
category and child pages as sub categories ... etc.

2) You can attach objects of a specfic class to pages in order to group
them in a given category.

You can see an example of this in the XWiki Blog application that is
installed by defaut in XWIki.

A page is considered as a Blog page if the page have an object of
class *'Blog.BlogPostClass'
*attached to it*.*

Find more details about the XWiki data model here:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel


Mohamed.


On Thu, Dec 29, 2016 at 4:21 AM, novnovice  wrote:

> I've been searching for docs and postings re categorization of xwiki
> pages. I
> didn't see anything built in so far but I may have missed it. I see there
> is
> a tags extension
>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Tag+Application
>
> I'd expect categorization to be a major interest for xwiki users. Is this
> tag extension the main resource? Did I miss something built in? The page
> Content Organization
> 
> has nested pages and subwikis as the primary artifacts of organization.
>
> I will be creating a event tracker and it's going to be important to
> provide
> metadata for the posts.
>
> I'm very new to xwiki, but as I wrote this I realized that there are other
> built in features of xwiki which will help solve my needs. For example, if
> I
> can define a form or template (not sure about the terms) which contains a
> field Event Date, I hope that can become a hard data point which can be
> queried etc. Pretty sure this is so; and that solves some of the issues
> without a "category" or "tag" feature.
>
> Despite the fact that I'm positing a question which stretches far beyond my
> current near zero skillset with xwiki, I'd still appreciate any pointers or
> references.
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.
> com/Categorization-of-pages-tags-tp7602216.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
>


[xwiki-users] [XWiki Forum] [News & Events] Document Accordion Macro 1.0 released

2017-06-23 Thread Mohamed Boussaa
[[Note: The XWiki project is switching away from this mailing list and moving 
to a forum: https://discourse.xwiki.org. This list will be made readonly in a 
few days. Please post on the forum from now on. Thanks.]]

-


Hello, 
it is possible that there are issues with the app on sub-wikis because It has 
not been tested on sub wikis.
please open JIRA issues at  https://jira.xwiki.org/browse/DOCACCORDI1

Thx, Mohamed





---
[Visit 
Topic](https://discourse.xwiki.org/t/document-accordion-macro-1-0-released/166/9)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discourse.xwiki.org/email/unsubscribe/582d79338a5e555e55d850b868a250ff0603dde093819d44bfed4de47e37bfd3).