cewebs-transformationengine 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/AUTHORS +1 -0
- data/LICENSE.GPL +674 -0
- data/README.md +99 -0
- data/Rakefile +19 -0
- data/cewebs-transformationengine.gemspec +25 -0
- data/index.html +37 -0
- data/lib/cewebs-transformationengine/helpers/site.rb +343 -0
- data/lib/cewebs-transformationengine/implementation.rb +514 -0
- data/lib/cewebs-transformationengine/implementation.xml +14 -0
- data/lib/cewebs-transformationengine/sites.xml +131 -0
- data/menupoints.rng +27 -0
- data/server/data/Default/aman.xml +16 -0
- data/server/data/Default/custom.xml +15 -0
- data/server/data/Default/persons.rng +106 -0
- data/server/data/Default/strings.default.xml +104 -0
- data/server/data/Default/strings.rng +674 -0
- data/server/data/Default/strings.xml +106 -0
- data/server/data/engine.xml +11 -0
- data/server/engine +15 -0
- data/static/icons/large/accessories-calculator.png +0 -0
- data/static/icons/large/accessories-character-map.png +0 -0
- data/static/icons/large/accessories-text-editor.png +0 -0
- data/static/icons/large/address-book-new.png +0 -0
- data/static/icons/large/application-certificate.png +0 -0
- data/static/icons/large/application-magicpoint.png +0 -0
- data/static/icons/large/application-msword.png +0 -0
- data/static/icons/large/application-ogg.png +0 -0
- data/static/icons/large/application-pdf.png +0 -0
- data/static/icons/large/application-postscript.png +0 -0
- data/static/icons/large/application-rtf.png +0 -0
- data/static/icons/large/application-vnd.lotus-1-2-3.png +0 -0
- data/static/icons/large/application-vnd.ms-excel.png +0 -0
- data/static/icons/large/application-vnd.ms-powerpoint.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.graphics-template.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.graphics.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.image.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.presentation-template.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.presentation.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.spreadsheet-template.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.spreadsheet.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.text-template.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.text-web.png +0 -0
- data/static/icons/large/application-vnd.oasis.opendocument.text.png +0 -0
- data/static/icons/large/application-vnd.rn-realmedia-secure.png +0 -0
- data/static/icons/large/application-vnd.rn-realmedia-vbr.png +0 -0
- data/static/icons/large/application-vnd.rn-realmedia.png +0 -0
- data/static/icons/large/application-vnd.stardivision.calc.png +0 -0
- data/static/icons/large/application-vnd.stardivision.impress.png +0 -0
- data/static/icons/large/application-vnd.stardivision.writer.png +0 -0
- data/static/icons/large/application-vnd.sun.xml.calc.png +0 -0
- data/static/icons/large/application-vnd.sun.xml.calc.template.png +0 -0
- data/static/icons/large/application-vnd.sun.xml.draw.png +0 -0
- data/static/icons/large/application-vnd.sun.xml.draw.template.png +0 -0
- data/static/icons/large/application-vnd.sun.xml.impress.png +0 -0
- data/static/icons/large/application-vnd.sun.xml.impress.template.png +0 -0
- data/static/icons/large/application-vnd.sun.xml.writer.png +0 -0
- data/static/icons/large/application-vnd.sun.xml.writer.template.png +0 -0
- data/static/icons/large/application-wordperfect.png +0 -0
- data/static/icons/large/application-x-7z-compressed.png +0 -0
- data/static/icons/large/application-x-abiword.png +0 -0
- data/static/icons/large/application-x-applix-spreadsheet.png +0 -0
- data/static/icons/large/application-x-applix-word.png +0 -0
- data/static/icons/large/application-x-archive.png +0 -0
- data/static/icons/large/application-x-arj.png +0 -0
- data/static/icons/large/application-x-bzip-compressed-tar.png +0 -0
- data/static/icons/large/application-x-bzip.png +0 -0
- data/static/icons/large/application-x-compress.png +0 -0
- data/static/icons/large/application-x-compressed-tar.png +0 -0
- data/static/icons/large/application-x-cpio-compressed.png +0 -0
- data/static/icons/large/application-x-cpio.png +0 -0
- data/static/icons/large/application-x-deb.png +0 -0
- data/static/icons/large/application-x-dvi.png +0 -0
- data/static/icons/large/application-x-executable.png +0 -0
- data/static/icons/large/application-x-font-afm.png +0 -0
- data/static/icons/large/application-x-font-bdf.png +0 -0
- data/static/icons/large/application-x-font-linux-psf.png +0 -0
- data/static/icons/large/application-x-font-pcf.png +0 -0
- data/static/icons/large/application-x-font-sunos-news.png +0 -0
- data/static/icons/large/application-x-font-ttf.png +0 -0
- data/static/icons/large/application-x-gnumeric.png +0 -0
- data/static/icons/large/application-x-gzip.png +0 -0
- data/static/icons/large/application-x-gzpostscript.png +0 -0
- data/static/icons/large/application-x-jar.png +0 -0
- data/static/icons/large/application-x-killustrator.png +0 -0
- data/static/icons/large/application-x-kpresenter.png +0 -0
- data/static/icons/large/application-x-kspread.png +0 -0
- data/static/icons/large/application-x-kword.png +0 -0
- data/static/icons/large/application-x-lha.png +0 -0
- data/static/icons/large/application-x-lhz.png +0 -0
- data/static/icons/large/application-x-ms-dos-executable.png +0 -0
- data/static/icons/large/application-x-perl.png +0 -0
- data/static/icons/large/application-x-python-bytecode.png +0 -0
- data/static/icons/large/application-x-rar.png +0 -0
- data/static/icons/large/application-x-rpm.png +0 -0
- data/static/icons/large/application-x-scribus.png +0 -0
- data/static/icons/large/application-x-shellscript.png +0 -0
- data/static/icons/large/application-x-stuffit.png +0 -0
- data/static/icons/large/application-x-tar.png +0 -0
- data/static/icons/large/application-x-tarz.png +0 -0
- data/static/icons/large/application-x-tex.png +0 -0
- data/static/icons/large/application-xhtml+xml.png +0 -0
- data/static/icons/large/application-zip.png +0 -0
- data/static/icons/large/applications-accessories.png +0 -0
- data/static/icons/large/applications-development.png +0 -0
- data/static/icons/large/applications-games.png +0 -0
- data/static/icons/large/applications-graphics.png +0 -0
- data/static/icons/large/applications-internet.png +0 -0
- data/static/icons/large/applications-multimedia.png +0 -0
- data/static/icons/large/applications-office.png +0 -0
- data/static/icons/large/applications-other.png +0 -0
- data/static/icons/large/applications-system.png +0 -0
- data/static/icons/large/appointment-new.png +0 -0
- data/static/icons/large/audio-card.png +0 -0
- data/static/icons/large/audio-input-microphone.png +0 -0
- data/static/icons/large/audio-volume-high.png +0 -0
- data/static/icons/large/audio-volume-low.png +0 -0
- data/static/icons/large/audio-volume-medium.png +0 -0
- data/static/icons/large/audio-volume-muted.png +0 -0
- data/static/icons/large/audio-x-generic.png +0 -0
- data/static/icons/large/audio.png +0 -0
- data/static/icons/large/battery-caution.png +0 -0
- data/static/icons/large/battery.png +0 -0
- data/static/icons/large/bookmark-new.png +0 -0
- data/static/icons/large/camera-photo.png +0 -0
- data/static/icons/large/camera-video.png +0 -0
- data/static/icons/large/computer.png +0 -0
- data/static/icons/large/contact-new.png +0 -0
- data/static/icons/large/dialog-error.png +0 -0
- data/static/icons/large/dialog-information.png +0 -0
- data/static/icons/large/dialog-warning.png +0 -0
- data/static/icons/large/document-new.png +0 -0
- data/static/icons/large/document-open.png +0 -0
- data/static/icons/large/document-print-preview.png +0 -0
- data/static/icons/large/document-print.png +0 -0
- data/static/icons/large/document-properties.png +0 -0
- data/static/icons/large/document-save-as.png +0 -0
- data/static/icons/large/document-save.png +0 -0
- data/static/icons/large/drive-harddisk.png +0 -0
- data/static/icons/large/drive-optical.png +0 -0
- data/static/icons/large/drive-removable-media.png +0 -0
- data/static/icons/large/edit-clear.png +0 -0
- data/static/icons/large/edit-copy.png +0 -0
- data/static/icons/large/edit-cut.png +0 -0
- data/static/icons/large/edit-delete.png +0 -0
- data/static/icons/large/edit-find-replace.png +0 -0
- data/static/icons/large/edit-find.png +0 -0
- data/static/icons/large/edit-paste.png +0 -0
- data/static/icons/large/edit-redo.png +0 -0
- data/static/icons/large/edit-select-all.png +0 -0
- data/static/icons/large/edit-undo.png +0 -0
- data/static/icons/large/emblem-favorite.png +0 -0
- data/static/icons/large/emblem-important.png +0 -0
- data/static/icons/large/emblem-photos.png +0 -0
- data/static/icons/large/emblem-readonly.png +0 -0
- data/static/icons/large/emblem-symbolic-link.png +0 -0
- data/static/icons/large/emblem-system.png +0 -0
- data/static/icons/large/emblem-unreadable.png +0 -0
- data/static/icons/large/face-angel.png +0 -0
- data/static/icons/large/face-crying.png +0 -0
- data/static/icons/large/face-devil-grin.png +0 -0
- data/static/icons/large/face-glasses.png +0 -0
- data/static/icons/large/face-grin.png +0 -0
- data/static/icons/large/face-kiss.png +0 -0
- data/static/icons/large/face-monkey.png +0 -0
- data/static/icons/large/face-plain.png +0 -0
- data/static/icons/large/face-sad.png +0 -0
- data/static/icons/large/face-smile-big.png +0 -0
- data/static/icons/large/face-smile.png +0 -0
- data/static/icons/large/face-surprise.png +0 -0
- data/static/icons/large/face-wink.png +0 -0
- data/static/icons/large/folder-drag-accept.png +0 -0
- data/static/icons/large/folder-new.png +0 -0
- data/static/icons/large/folder-open.png +0 -0
- data/static/icons/large/folder-remote.png +0 -0
- data/static/icons/large/folder-saved-search.png +0 -0
- data/static/icons/large/folder-visiting.png +0 -0
- data/static/icons/large/folder.png +0 -0
- data/static/icons/large/font-x-generic.png +0 -0
- data/static/icons/large/format-indent-less.png +0 -0
- data/static/icons/large/format-indent-more.png +0 -0
- data/static/icons/large/format-justify-center.png +0 -0
- data/static/icons/large/format-justify-fill.png +0 -0
- data/static/icons/large/format-justify-left.png +0 -0
- data/static/icons/large/format-justify-right.png +0 -0
- data/static/icons/large/format-text-bold.png +0 -0
- data/static/icons/large/format-text-italic.png +0 -0
- data/static/icons/large/format-text-strikethrough.png +0 -0
- data/static/icons/large/format-text-underline.png +0 -0
- data/static/icons/large/go-bottom.png +0 -0
- data/static/icons/large/go-down.png +0 -0
- data/static/icons/large/go-first.png +0 -0
- data/static/icons/large/go-home.png +0 -0
- data/static/icons/large/go-jump.png +0 -0
- data/static/icons/large/go-last.png +0 -0
- data/static/icons/large/go-next.png +0 -0
- data/static/icons/large/go-previous.png +0 -0
- data/static/icons/large/go-top.png +0 -0
- data/static/icons/large/go-up.png +0 -0
- data/static/icons/large/help-browser.png +0 -0
- data/static/icons/large/image-loading.png +0 -0
- data/static/icons/large/image-missing.png +0 -0
- data/static/icons/large/image-x-generic.png +0 -0
- data/static/icons/large/input-gaming.png +0 -0
- data/static/icons/large/input-keyboard.png +0 -0
- data/static/icons/large/input-mouse.png +0 -0
- data/static/icons/large/internet-group-chat.png +0 -0
- data/static/icons/large/internet-mail.png +0 -0
- data/static/icons/large/internet-news-reader.png +0 -0
- data/static/icons/large/internet-web-browser.png +0 -0
- data/static/icons/large/list-add.png +0 -0
- data/static/icons/large/list-remove.png +0 -0
- data/static/icons/large/mail-attachment.png +0 -0
- data/static/icons/large/mail-forward.png +0 -0
- data/static/icons/large/mail-mark-junk.png +0 -0
- data/static/icons/large/mail-mark-not-junk.png +0 -0
- data/static/icons/large/mail-message-new.png +0 -0
- data/static/icons/large/mail-reply-all.png +0 -0
- data/static/icons/large/mail-reply-sender.png +0 -0
- data/static/icons/large/mail-send-receive.png +0 -0
- data/static/icons/large/media-eject.png +0 -0
- data/static/icons/large/media-flash.png +0 -0
- data/static/icons/large/media-floppy.png +0 -0
- data/static/icons/large/media-optical.png +0 -0
- data/static/icons/large/media-playback-pause.png +0 -0
- data/static/icons/large/media-playback-start.png +0 -0
- data/static/icons/large/media-playback-stop.png +0 -0
- data/static/icons/large/media-record.png +0 -0
- data/static/icons/large/media-seek-backward.png +0 -0
- data/static/icons/large/media-seek-forward.png +0 -0
- data/static/icons/large/media-skip-backward.png +0 -0
- data/static/icons/large/media-skip-forward.png +0 -0
- data/static/icons/large/mime-application-x-php.png +0 -0
- data/static/icons/large/mime-application-x-shockwave-flash.png +0 -0
- data/static/icons/large/mime-image.png +0 -0
- data/static/icons/large/multimedia-player.png +0 -0
- data/static/icons/large/network-error.png +0 -0
- data/static/icons/large/network-idle.png +0 -0
- data/static/icons/large/network-offline.png +0 -0
- data/static/icons/large/network-receive.png +0 -0
- data/static/icons/large/network-server.png +0 -0
- data/static/icons/large/network-transmit-receive.png +0 -0
- data/static/icons/large/network-transmit.png +0 -0
- data/static/icons/large/network-wired.png +0 -0
- data/static/icons/large/network-wireless-encrypted.png +0 -0
- data/static/icons/large/network-wireless.png +0 -0
- data/static/icons/large/network-workgroup.png +0 -0
- data/static/icons/large/office-calendar.png +0 -0
- data/static/icons/large/package-x-generic.png +0 -0
- data/static/icons/large/preferences-desktop-accessibility.png +0 -0
- data/static/icons/large/preferences-desktop-assistive-technology.png +0 -0
- data/static/icons/large/preferences-desktop-font.png +0 -0
- data/static/icons/large/preferences-desktop-keyboard-shortcuts.png +0 -0
- data/static/icons/large/preferences-desktop-locale.png +0 -0
- data/static/icons/large/preferences-desktop-peripherals.png +0 -0
- data/static/icons/large/preferences-desktop-remote-desktop.png +0 -0
- data/static/icons/large/preferences-desktop-screensaver.png +0 -0
- data/static/icons/large/preferences-desktop-sound.png +0 -0
- data/static/icons/large/preferences-desktop-theme.png +0 -0
- data/static/icons/large/preferences-desktop-wallpaper.png +0 -0
- data/static/icons/large/preferences-desktop.png +0 -0
- data/static/icons/large/preferences-system-network-proxy.png +0 -0
- data/static/icons/large/preferences-system-session.png +0 -0
- data/static/icons/large/preferences-system-windows.png +0 -0
- data/static/icons/large/preferences-system.png +0 -0
- data/static/icons/large/printer-error.png +0 -0
- data/static/icons/large/printer.png +0 -0
- data/static/icons/large/process-stop.png +0 -0
- data/static/icons/large/process-working.png +0 -0
- data/static/icons/large/start-here.png +0 -0
- data/static/icons/large/system-file-manager.png +0 -0
- data/static/icons/large/system-installer.png +0 -0
- data/static/icons/large/system-lock-screen.png +0 -0
- data/static/icons/large/system-log-out.png +0 -0
- data/static/icons/large/system-search.png +0 -0
- data/static/icons/large/system-shutdown.png +0 -0
- data/static/icons/large/system-software-update.png +0 -0
- data/static/icons/large/system-users.png +0 -0
- data/static/icons/large/tab-new.png +0 -0
- data/static/icons/large/text-html.png +0 -0
- data/static/icons/large/text-vnd.wap.wml.png +0 -0
- data/static/icons/large/text-x-csh.png +0 -0
- data/static/icons/large/text-x-generic-template.png +0 -0
- data/static/icons/large/text-x-generic.png +0 -0
- data/static/icons/large/text-x-python.png +0 -0
- data/static/icons/large/text-x-script.png +0 -0
- data/static/icons/large/text-x-sh.png +0 -0
- data/static/icons/large/text-x-vcalendar.png +0 -0
- data/static/icons/large/text-x-vcard.png +0 -0
- data/static/icons/large/text-x-zsh.png +0 -0
- data/static/icons/large/text.png +0 -0
- data/static/icons/large/user-desktop.png +0 -0
- data/static/icons/large/user-home.png +0 -0
- data/static/icons/large/user-trash-full.png +0 -0
- data/static/icons/large/user-trash.png +0 -0
- data/static/icons/large/utilities-system-monitor.png +0 -0
- data/static/icons/large/utilities-terminal.png +0 -0
- data/static/icons/large/video-display.png +0 -0
- data/static/icons/large/video-x-generic.png +0 -0
- data/static/icons/large/video.png +0 -0
- data/static/icons/large/view-fullscreen.png +0 -0
- data/static/icons/large/view-refresh.png +0 -0
- data/static/icons/large/weather-clear-night.png +0 -0
- data/static/icons/large/weather-clear.png +0 -0
- data/static/icons/large/weather-few-clouds-night.png +0 -0
- data/static/icons/large/weather-few-clouds.png +0 -0
- data/static/icons/large/weather-overcast.png +0 -0
- data/static/icons/large/weather-severe-alert.png +0 -0
- data/static/icons/large/weather-showers-scattered.png +0 -0
- data/static/icons/large/weather-showers.png +0 -0
- data/static/icons/large/weather-snow.png +0 -0
- data/static/icons/large/weather-storm.png +0 -0
- data/static/icons/large/window-new.png +0 -0
- data/static/icons/large/x-font-afm.png +0 -0
- data/static/icons/large/x-office-address-book.png +0 -0
- data/static/icons/large/x-office-calendar.png +0 -0
- data/static/icons/large/x-office-document-template.png +0 -0
- data/static/icons/large/x-office-document.png +0 -0
- data/static/icons/large/x-office-drawing-template.png +0 -0
- data/static/icons/large/x-office-drawing.png +0 -0
- data/static/icons/large/x-office-presentation-template.png +0 -0
- data/static/icons/large/x-office-presentation.png +0 -0
- data/static/icons/large/x-office-spreadsheet-template.png +0 -0
- data/static/icons/large/x-office-spreadsheet.png +0 -0
- data/static/icons/small/accessories-calculator.png +0 -0
- data/static/icons/small/accessories-character-map.png +0 -0
- data/static/icons/small/accessories-text-editor.png +0 -0
- data/static/icons/small/address-book-new.png +0 -0
- data/static/icons/small/application-certificate.png +0 -0
- data/static/icons/small/application-magicpoint.png +0 -0
- data/static/icons/small/application-msword.png +0 -0
- data/static/icons/small/application-ogg.png +0 -0
- data/static/icons/small/application-pdf.png +0 -0
- data/static/icons/small/application-postscript.png +0 -0
- data/static/icons/small/application-rar.png +0 -0
- data/static/icons/small/application-rtf.png +0 -0
- data/static/icons/small/application-vnd.lotus-1-2-3.png +0 -0
- data/static/icons/small/application-vnd.ms-excel.png +0 -0
- data/static/icons/small/application-vnd.ms-powerpoint.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.chart.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.formula.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.graphics-template.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.graphics.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.image.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.presentation-template.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.presentation.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.spreadsheet-template.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.spreadsheet.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.text-template.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.text-web.png +0 -0
- data/static/icons/small/application-vnd.oasis.opendocument.text.png +0 -0
- data/static/icons/small/application-vnd.rn-realmedia-secure.png +0 -0
- data/static/icons/small/application-vnd.rn-realmedia-vbr.png +0 -0
- data/static/icons/small/application-vnd.rn-realmedia.png +0 -0
- data/static/icons/small/application-vnd.stardivision.calc.png +0 -0
- data/static/icons/small/application-vnd.stardivision.impress.png +0 -0
- data/static/icons/small/application-vnd.stardivision.writer.png +0 -0
- data/static/icons/small/application-vnd.sun.xml.calc.png +0 -0
- data/static/icons/small/application-vnd.sun.xml.calc.template.png +0 -0
- data/static/icons/small/application-vnd.sun.xml.draw.png +0 -0
- data/static/icons/small/application-vnd.sun.xml.draw.template.png +0 -0
- data/static/icons/small/application-vnd.sun.xml.impress.png +0 -0
- data/static/icons/small/application-vnd.sun.xml.impress.template.png +0 -0
- data/static/icons/small/application-vnd.sun.xml.writer.png +0 -0
- data/static/icons/small/application-vnd.sun.xml.writer.template.png +0 -0
- data/static/icons/small/application-wordperfect.png +0 -0
- data/static/icons/small/application-x-7z-compressed.png +0 -0
- data/static/icons/small/application-x-abiword.png +0 -0
- data/static/icons/small/application-x-applix-spreadsheet.png +0 -0
- data/static/icons/small/application-x-applix-word.png +0 -0
- data/static/icons/small/application-x-archive.png +0 -0
- data/static/icons/small/application-x-arj.png +0 -0
- data/static/icons/small/application-x-bzip-compressed-tar.png +0 -0
- data/static/icons/small/application-x-bzip.png +0 -0
- data/static/icons/small/application-x-chm.png +0 -0
- data/static/icons/small/application-x-compress.png +0 -0
- data/static/icons/small/application-x-compressed-tar.png +0 -0
- data/static/icons/small/application-x-cpio-compressed.png +0 -0
- data/static/icons/small/application-x-cpio.png +0 -0
- data/static/icons/small/application-x-deb.png +0 -0
- data/static/icons/small/application-x-debian-package.png +0 -0
- data/static/icons/small/application-x-dvi.png +0 -0
- data/static/icons/small/application-x-executable.png +0 -0
- data/static/icons/small/application-x-font-afm.png +0 -0
- data/static/icons/small/application-x-font-bdf.png +0 -0
- data/static/icons/small/application-x-font-linux-psf.png +0 -0
- data/static/icons/small/application-x-font-pcf.png +0 -0
- data/static/icons/small/application-x-font-sunos-news.png +0 -0
- data/static/icons/small/application-x-font-ttf.png +0 -0
- data/static/icons/small/application-x-gnumeric.png +0 -0
- data/static/icons/small/application-x-gtar.png +0 -0
- data/static/icons/small/application-x-gzip.png +0 -0
- data/static/icons/small/application-x-gzpostscript.png +0 -0
- data/static/icons/small/application-x-httpd-php.png +0 -0
- data/static/icons/small/application-x-iso9660-image.png +0 -0
- data/static/icons/small/application-x-jar.png +0 -0
- data/static/icons/small/application-x-javascript.png +0 -0
- data/static/icons/small/application-x-killustrator.png +0 -0
- data/static/icons/small/application-x-kpresenter.png +0 -0
- data/static/icons/small/application-x-kspread.png +0 -0
- data/static/icons/small/application-x-kword.png +0 -0
- data/static/icons/small/application-x-lha.png +0 -0
- data/static/icons/small/application-x-lhz.png +0 -0
- data/static/icons/small/application-x-ms-dos-executable.png +0 -0
- data/static/icons/small/application-x-perl.png +0 -0
- data/static/icons/small/application-x-python-bytecode.png +0 -0
- data/static/icons/small/application-x-rar.png +0 -0
- data/static/icons/small/application-x-redhat-package-manager.png +0 -0
- data/static/icons/small/application-x-rpm.png +0 -0
- data/static/icons/small/application-x-scribus.png +0 -0
- data/static/icons/small/application-x-shellscript.png +0 -0
- data/static/icons/small/application-x-shockwave-flash.png +0 -0
- data/static/icons/small/application-x-stuffit.png +0 -0
- data/static/icons/small/application-x-tar.png +0 -0
- data/static/icons/small/application-x-tarz.png +0 -0
- data/static/icons/small/application-x-tex.png +0 -0
- data/static/icons/small/application-x-xpinstall.png +0 -0
- data/static/icons/small/application-xhtml+xml.png +0 -0
- data/static/icons/small/application-xml.png +0 -0
- data/static/icons/small/application-zip.png +0 -0
- data/static/icons/small/applications-accessories.png +0 -0
- data/static/icons/small/applications-development.png +0 -0
- data/static/icons/small/applications-games.png +0 -0
- data/static/icons/small/applications-graphics.png +0 -0
- data/static/icons/small/applications-internet.png +0 -0
- data/static/icons/small/applications-multimedia.png +0 -0
- data/static/icons/small/applications-office.png +0 -0
- data/static/icons/small/applications-other.png +0 -0
- data/static/icons/small/applications-system.png +0 -0
- data/static/icons/small/appointment-new.png +0 -0
- data/static/icons/small/audio-card.png +0 -0
- data/static/icons/small/audio-input-microphone.png +0 -0
- data/static/icons/small/audio-mpeg.png +0 -0
- data/static/icons/small/audio-volume-high.png +0 -0
- data/static/icons/small/audio-volume-low.png +0 -0
- data/static/icons/small/audio-volume-medium.png +0 -0
- data/static/icons/small/audio-volume-muted.png +0 -0
- data/static/icons/small/audio-x-aiff.png +0 -0
- data/static/icons/small/audio-x-generic.png +0 -0
- data/static/icons/small/audio-x-ms-wma.png +0 -0
- data/static/icons/small/audio-x-pn-realaudio.png +0 -0
- data/static/icons/small/audio-x-wav.png +0 -0
- data/static/icons/small/audio.png +0 -0
- data/static/icons/small/battery-caution.png +0 -0
- data/static/icons/small/battery.png +0 -0
- data/static/icons/small/bookmark-new.png +0 -0
- data/static/icons/small/camera-photo.png +0 -0
- data/static/icons/small/camera-video.png +0 -0
- data/static/icons/small/chemical-x-mopac-input.png +0 -0
- data/static/icons/small/computer.png +0 -0
- data/static/icons/small/contact-new.png +0 -0
- data/static/icons/small/dialog-error.png +0 -0
- data/static/icons/small/dialog-information.png +0 -0
- data/static/icons/small/dialog-warning.png +0 -0
- data/static/icons/small/document-new.png +0 -0
- data/static/icons/small/document-open.png +0 -0
- data/static/icons/small/document-print-preview.png +0 -0
- data/static/icons/small/document-print.png +0 -0
- data/static/icons/small/document-properties.png +0 -0
- data/static/icons/small/document-save-as.png +0 -0
- data/static/icons/small/document-save.png +0 -0
- data/static/icons/small/drive-harddisk.png +0 -0
- data/static/icons/small/drive-optical.png +0 -0
- data/static/icons/small/drive-removable-media.png +0 -0
- data/static/icons/small/edit-clear.png +0 -0
- data/static/icons/small/edit-copy.png +0 -0
- data/static/icons/small/edit-cut.png +0 -0
- data/static/icons/small/edit-delete.png +0 -0
- data/static/icons/small/edit-find-replace.png +0 -0
- data/static/icons/small/edit-find.png +0 -0
- data/static/icons/small/edit-paste.png +0 -0
- data/static/icons/small/edit-redo.png +0 -0
- data/static/icons/small/edit-select-all.png +0 -0
- data/static/icons/small/edit-undo.png +0 -0
- data/static/icons/small/emblem-favorite.png +0 -0
- data/static/icons/small/emblem-important.png +0 -0
- data/static/icons/small/emblem-photos.png +0 -0
- data/static/icons/small/emblem-readonly.png +0 -0
- data/static/icons/small/emblem-symbolic-link.png +0 -0
- data/static/icons/small/emblem-system.png +0 -0
- data/static/icons/small/emblem-unreadable.png +0 -0
- data/static/icons/small/face-angel.png +0 -0
- data/static/icons/small/face-crying.png +0 -0
- data/static/icons/small/face-devil-grin.png +0 -0
- data/static/icons/small/face-glasses.png +0 -0
- data/static/icons/small/face-grin.png +0 -0
- data/static/icons/small/face-kiss.png +0 -0
- data/static/icons/small/face-monkey.png +0 -0
- data/static/icons/small/face-plain.png +0 -0
- data/static/icons/small/face-sad.png +0 -0
- data/static/icons/small/face-smile-big.png +0 -0
- data/static/icons/small/face-smile.png +0 -0
- data/static/icons/small/face-surprise.png +0 -0
- data/static/icons/small/face-wink.png +0 -0
- data/static/icons/small/folder-drag-accept.png +0 -0
- data/static/icons/small/folder-new.png +0 -0
- data/static/icons/small/folder-open.png +0 -0
- data/static/icons/small/folder-remote.png +0 -0
- data/static/icons/small/folder-saved-search.png +0 -0
- data/static/icons/small/folder-visiting.png +0 -0
- data/static/icons/small/folder.png +0 -0
- data/static/icons/small/font-x-generic.png +0 -0
- data/static/icons/small/format-indent-less.png +0 -0
- data/static/icons/small/format-indent-more.png +0 -0
- data/static/icons/small/format-justify-center.png +0 -0
- data/static/icons/small/format-justify-fill.png +0 -0
- data/static/icons/small/format-justify-left.png +0 -0
- data/static/icons/small/format-justify-right.png +0 -0
- data/static/icons/small/format-text-bold.png +0 -0
- data/static/icons/small/format-text-italic.png +0 -0
- data/static/icons/small/format-text-strikethrough.png +0 -0
- data/static/icons/small/format-text-underline.png +0 -0
- data/static/icons/small/go-bottom.png +0 -0
- data/static/icons/small/go-down.png +0 -0
- data/static/icons/small/go-first.png +0 -0
- data/static/icons/small/go-home.png +0 -0
- data/static/icons/small/go-jump.png +0 -0
- data/static/icons/small/go-last.png +0 -0
- data/static/icons/small/go-next.png +0 -0
- data/static/icons/small/go-previous.png +0 -0
- data/static/icons/small/go-top.png +0 -0
- data/static/icons/small/go-up.png +0 -0
- data/static/icons/small/help-browser.png +0 -0
- data/static/icons/small/image-gif.png +0 -0
- data/static/icons/small/image-jpeg.png +0 -0
- data/static/icons/small/image-loading.png +0 -0
- data/static/icons/small/image-missing.png +0 -0
- data/static/icons/small/image-png.png +0 -0
- data/static/icons/small/image-x-generic.png +0 -0
- data/static/icons/small/input-gaming.png +0 -0
- data/static/icons/small/input-keyboard.png +0 -0
- data/static/icons/small/input-mouse.png +0 -0
- data/static/icons/small/internet-group-chat.png +0 -0
- data/static/icons/small/internet-mail.png +0 -0
- data/static/icons/small/internet-news-reader.png +0 -0
- data/static/icons/small/internet-web-browser.png +0 -0
- data/static/icons/small/list-add.png +0 -0
- data/static/icons/small/list-remove.png +0 -0
- data/static/icons/small/locked.png +0 -0
- data/static/icons/small/mail-attachment.png +0 -0
- data/static/icons/small/mail-forward.png +0 -0
- data/static/icons/small/mail-mark-junk.png +0 -0
- data/static/icons/small/mail-mark-not-junk.png +0 -0
- data/static/icons/small/mail-message-new.png +0 -0
- data/static/icons/small/mail-reply-all.png +0 -0
- data/static/icons/small/mail-reply-sender.png +0 -0
- data/static/icons/small/mail-send-receive.png +0 -0
- data/static/icons/small/media-eject.png +0 -0
- data/static/icons/small/media-flash.png +0 -0
- data/static/icons/small/media-floppy.png +0 -0
- data/static/icons/small/media-optical.png +0 -0
- data/static/icons/small/media-playback-pause.png +0 -0
- data/static/icons/small/media-playback-start.png +0 -0
- data/static/icons/small/media-playback-stop.png +0 -0
- data/static/icons/small/media-record.png +0 -0
- data/static/icons/small/media-seek-backward.png +0 -0
- data/static/icons/small/media-seek-forward.png +0 -0
- data/static/icons/small/media-skip-backward.png +0 -0
- data/static/icons/small/media-skip-forward.png +0 -0
- data/static/icons/small/multimedia-player.png +0 -0
- data/static/icons/small/network-error.png +0 -0
- data/static/icons/small/network-idle.png +0 -0
- data/static/icons/small/network-offline.png +0 -0
- data/static/icons/small/network-receive.png +0 -0
- data/static/icons/small/network-server.png +0 -0
- data/static/icons/small/network-transmit-receive.png +0 -0
- data/static/icons/small/network-transmit.png +0 -0
- data/static/icons/small/network-wired.png +0 -0
- data/static/icons/small/network-wireless-encrypted.png +0 -0
- data/static/icons/small/network-wireless.png +0 -0
- data/static/icons/small/network-workgroup.png +0 -0
- data/static/icons/small/office-calendar.png +0 -0
- data/static/icons/small/package-x-generic.png +0 -0
- data/static/icons/small/preferences-desktop-accessibility.png +0 -0
- data/static/icons/small/preferences-desktop-assistive-technology.png +0 -0
- data/static/icons/small/preferences-desktop-font.png +0 -0
- data/static/icons/small/preferences-desktop-keyboard-shortcuts.png +0 -0
- data/static/icons/small/preferences-desktop-locale.png +0 -0
- data/static/icons/small/preferences-desktop-peripherals.png +0 -0
- data/static/icons/small/preferences-desktop-remote-desktop.png +0 -0
- data/static/icons/small/preferences-desktop-screensaver.png +0 -0
- data/static/icons/small/preferences-desktop-sound.png +0 -0
- data/static/icons/small/preferences-desktop-theme.png +0 -0
- data/static/icons/small/preferences-desktop-wallpaper.png +0 -0
- data/static/icons/small/preferences-desktop.png +0 -0
- data/static/icons/small/preferences-system-network-proxy.png +0 -0
- data/static/icons/small/preferences-system-session.png +0 -0
- data/static/icons/small/preferences-system-windows.png +0 -0
- data/static/icons/small/preferences-system.png +0 -0
- data/static/icons/small/printer-error.png +0 -0
- data/static/icons/small/printer.png +0 -0
- data/static/icons/small/process-stop.png +0 -0
- data/static/icons/small/process-working.png +0 -0
- data/static/icons/small/start-here.png +0 -0
- data/static/icons/small/system-file-manager.png +0 -0
- data/static/icons/small/system-installer.png +0 -0
- data/static/icons/small/system-lock-screen.png +0 -0
- data/static/icons/small/system-log-out.png +0 -0
- data/static/icons/small/system-search.png +0 -0
- data/static/icons/small/system-shutdown.png +0 -0
- data/static/icons/small/system-software-update.png +0 -0
- data/static/icons/small/system-users.png +0 -0
- data/static/icons/small/tab-new.png +0 -0
- data/static/icons/small/text-css.png +0 -0
- data/static/icons/small/text-html.png +0 -0
- data/static/icons/small/text-plain.png +0 -0
- data/static/icons/small/text-vnd.wap.wml.png +0 -0
- data/static/icons/small/text-x-c++src.png +0 -0
- data/static/icons/small/text-x-chdr.png +0 -0
- data/static/icons/small/text-x-cppsrc.png +0 -0
- data/static/icons/small/text-x-csh.png +0 -0
- data/static/icons/small/text-x-csrc.png +0 -0
- data/static/icons/small/text-x-generic-template.png +0 -0
- data/static/icons/small/text-x-generic.png +0 -0
- data/static/icons/small/text-x-java.png +0 -0
- data/static/icons/small/text-x-perl.png +0 -0
- data/static/icons/small/text-x-python.png +0 -0
- data/static/icons/small/text-x-script.png +0 -0
- data/static/icons/small/text-x-sh.png +0 -0
- data/static/icons/small/text-x-tex.png +0 -0
- data/static/icons/small/text-x-vcalendar.png +0 -0
- data/static/icons/small/text-x-vcard.png +0 -0
- data/static/icons/small/text-x-zsh.png +0 -0
- data/static/icons/small/text.png +0 -0
- data/static/icons/small/unlocked.png +0 -0
- data/static/icons/small/user-desktop.png +0 -0
- data/static/icons/small/user-home.png +0 -0
- data/static/icons/small/user-trash-full.png +0 -0
- data/static/icons/small/user-trash.png +0 -0
- data/static/icons/small/utilities-system-monitor.png +0 -0
- data/static/icons/small/utilities-terminal.png +0 -0
- data/static/icons/small/video-display.png +0 -0
- data/static/icons/small/video-mpeg.png +0 -0
- data/static/icons/small/video-quicktime.png +0 -0
- data/static/icons/small/video-x-generic.png +0 -0
- data/static/icons/small/video-x-ms-wmv.png +0 -0
- data/static/icons/small/video.png +0 -0
- data/static/icons/small/view-fullscreen.png +0 -0
- data/static/icons/small/view-refresh.png +0 -0
- data/static/icons/small/weather-clear-night.png +0 -0
- data/static/icons/small/weather-clear.png +0 -0
- data/static/icons/small/weather-few-clouds-night.png +0 -0
- data/static/icons/small/weather-few-clouds.png +0 -0
- data/static/icons/small/weather-overcast.png +0 -0
- data/static/icons/small/weather-severe-alert.png +0 -0
- data/static/icons/small/weather-showers-scattered.png +0 -0
- data/static/icons/small/weather-showers.png +0 -0
- data/static/icons/small/weather-snow.png +0 -0
- data/static/icons/small/weather-storm.png +0 -0
- data/static/icons/small/window-new.png +0 -0
- data/static/icons/small/x-font-afm.png +0 -0
- data/static/icons/small/x-office-address-book.png +0 -0
- data/static/icons/small/x-office-calendar.png +0 -0
- data/static/icons/small/x-office-document-template.png +0 -0
- data/static/icons/small/x-office-document.png +0 -0
- data/static/icons/small/x-office-drawing-template.png +0 -0
- data/static/icons/small/x-office-drawing.png +0 -0
- data/static/icons/small/x-office-presentation-template.png +0 -0
- data/static/icons/small/x-office-presentation.png +0 -0
- data/static/icons/small/x-office-spreadsheet-template.png +0 -0
- data/static/icons/small/x-office-spreadsheet.png +0 -0
- data/static/icons/tiny/blank.png +0 -0
- data/static/icons/tiny/go-down.png +0 -0
- data/static/icons/tiny/go-down.svg +199 -0
- data/static/icons/tiny/go-up.png +0 -0
- data/static/icons/tiny/go-up.svg +195 -0
- data/static/icons/tiny/sort-ascending.png +0 -0
- data/static/icons/tiny/sort-ascending.svg +308 -0
- data/static/icons/tiny/sort-descending.png +0 -0
- data/static/icons/tiny/sort-descending.svg +308 -0
- data/static/js/administration.js +306 -0
- data/static/js/engine.js +414 -0
- data/static/js/jquery/base64.js +133 -0
- data/static/js/jquery/jquery-ui.min.js +6 -0
- data/static/js/jquery/jquery.min.js +2 -0
- data/static/js/jquery/printf.js +155 -0
- data/static/styles/AdwaitaSans-Latin.woff2 +0 -0
- data/static/styles/AdwaitaSans-Regular.ttf +0 -0
- data/static/styles/AdwaitaSans-Regular.ttf.License +96 -0
- data/static/styles/CEWebS.ico +0 -0
- data/static/styles/content.css +757 -0
- data/static/styles/fullplain.css +6 -0
- data/static/styles/jquery-ui/custom.css +75 -0
- data/static/styles/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/static/styles/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/static/styles/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/static/styles/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/static/styles/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/static/styles/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/static/styles/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
- data/static/styles/jquery-ui/images/ui-icons_2e83ff_256x240.png +0 -0
- data/static/styles/jquery-ui/images/ui-icons_454545_256x240.png +0 -0
- data/static/styles/jquery-ui/images/ui-icons_888888_256x240.png +0 -0
- data/static/styles/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/static/styles/jquery-ui/jquery-ui.css +1312 -0
- data/static/styles/plain.css +246 -0
- data/static/styles/plain_ohne.css +6 -0
- data/static/styles/print.css +28 -0
- data/static/styles/uni.compact.css +262 -0
- data/static/styles/uni.css +299 -0
- data/static/styles/uni_big.css +5 -0
- data/tools/cewebs-transformationengine +98 -0
- metadata +785 -0
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
# Please see the LICENSE.GPL file for copyright and distribution information
|
|
2
|
+
require 'net/smtp'
|
|
3
|
+
require 'mimemagic'
|
|
4
|
+
require 'cewebs-servicesbase/service'
|
|
5
|
+
require_relative 'helpers/site'
|
|
6
|
+
|
|
7
|
+
module Engine
|
|
8
|
+
SERVER = CEWebS::declaration(File.join(__dir__,'implementation.xml'))
|
|
9
|
+
|
|
10
|
+
def self::implementation(opts) #{{{
|
|
11
|
+
CEWebS::data_dir = File.expand_path(opts[:data_dir] || 'data',opts[:basepath])
|
|
12
|
+
|
|
13
|
+
Proc.new do
|
|
14
|
+
interface 'sites', &Engine::sites
|
|
15
|
+
interface 'administration', &CEWebS::administration(Engine::Administration.new)
|
|
16
|
+
end
|
|
17
|
+
end #}}}
|
|
18
|
+
|
|
19
|
+
class Answers < MarkUS
|
|
20
|
+
template :page do
|
|
21
|
+
page_ do
|
|
22
|
+
style_ @site.custom.root.attributes['style']
|
|
23
|
+
if @user
|
|
24
|
+
user_ do
|
|
25
|
+
id_ @user.attributes['id']
|
|
26
|
+
name_ @user.attributes['name']
|
|
27
|
+
role_ @user.attributes['admin']
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
if @target
|
|
31
|
+
target_ do
|
|
32
|
+
name_ @target.name
|
|
33
|
+
description_ @target.description
|
|
34
|
+
command_ @target.command
|
|
35
|
+
parameters_ @target.parameters
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
strings_ do
|
|
39
|
+
# markup in texts is escaped
|
|
40
|
+
@site.strings(@language).find('*').each { |s| element_! s.qname.name, CGI.unescapeHTML(s.to_s) }
|
|
41
|
+
nil
|
|
42
|
+
end
|
|
43
|
+
menu_ { template_! :points, @site.custom.find('/custom/menupoints/point') }
|
|
44
|
+
nil
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
template :points do |points|
|
|
48
|
+
points.each do |p|
|
|
49
|
+
point_ :name => p.attributes['name'], :service => p.attributes['service'] do
|
|
50
|
+
text_ p.lfind('text',@language).to_s
|
|
51
|
+
command_ p.sfind('command') if p.attributes['service'] == 'hyperlink'
|
|
52
|
+
template_! :points, p.find('point')
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
nil
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
template :services do
|
|
59
|
+
services_ do
|
|
60
|
+
@site.custom.find('/custom/registries/registry').each do |r|
|
|
61
|
+
registry_ :id => r.attributes['id'] do
|
|
62
|
+
name_ r.attributes['name']
|
|
63
|
+
r.find('service').each do |s|
|
|
64
|
+
service_ :name => s.attributes['name'], :locked => s.attributes['locked'] do
|
|
65
|
+
comment_ s.sfind('comment')
|
|
66
|
+
instance_ s.sfind('instance')
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
begin
|
|
70
|
+
repository = @site.repository(r,@language)
|
|
71
|
+
repository.list('shared').each do |s|
|
|
72
|
+
shared_ :id => s[:id] do
|
|
73
|
+
short_ s[:short]
|
|
74
|
+
long_ s[:long]
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
repository.list('available').each do |a|
|
|
78
|
+
available_ :id => a[:id] do
|
|
79
|
+
name_ a[:name]
|
|
80
|
+
details_ a[:details]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
rescue CEWebS::Error
|
|
84
|
+
down_
|
|
85
|
+
end
|
|
86
|
+
nil
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
nil
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
template :reports do
|
|
94
|
+
services_ do
|
|
95
|
+
@site.custom.find('/custom/registries/registry').each do |r|
|
|
96
|
+
r.find('service').each do |s|
|
|
97
|
+
available = @site.repository(r).list("services/#{s.attributes['key']}/reports")[0][:available] rescue 'false'
|
|
98
|
+
next unless available == 'true'
|
|
99
|
+
service_ :name => s.attributes['name'] do
|
|
100
|
+
comment_ s.sfind('comment')
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
nil
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def initialize(site,user,language,target=nil)
|
|
109
|
+
@site, @user, @language, @target = site, user, language, target
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
class DoSite < Riddl::Implementation
|
|
114
|
+
include CEWebS::Respond
|
|
115
|
+
|
|
116
|
+
HITS = 20
|
|
117
|
+
INLINE = /\A(image\/(png|jpeg|gif|webp)|application\/pdf|(audio|video)\/.*)\z/
|
|
118
|
+
|
|
119
|
+
def response #{{{
|
|
120
|
+
respond do
|
|
121
|
+
# browsers tell if a request comes from a page of somebody else
|
|
122
|
+
raise CEWebS::Error.new('not allowed',403) if @m.to_s != 'get' && ![nil,'same-origin'].include?(@h['SEC_FETCH_SITE'])
|
|
123
|
+
@begin = clock
|
|
124
|
+
@times = {}
|
|
125
|
+
@site = Site.new(@r[0])
|
|
126
|
+
@token = @h['COOKIE'].to_s[/(?:\A|;\s*)#{cookie}=(\h{32})/,1]
|
|
127
|
+
@user = @site.user(@token)
|
|
128
|
+
@language = languages
|
|
129
|
+
send(@a[0])
|
|
130
|
+
end
|
|
131
|
+
end #}}}
|
|
132
|
+
|
|
133
|
+
private
|
|
134
|
+
|
|
135
|
+
def cookie; "cewebs_#{@site.name.gsub(/\W/,'_')}"; end
|
|
136
|
+
def admin?; @user && @user.attributes['admin'] == 'true'; end
|
|
137
|
+
def report?; @user && %w{true limited}.include?(@user.attributes['admin']); end
|
|
138
|
+
def allow(condition); raise CEWebS::Error.new('not allowed',@user ? 403 : 401) unless condition; end
|
|
139
|
+
def text(index); @p[index].value.to_s.dup.force_encoding('UTF-8').scrub; end
|
|
140
|
+
def answer(template,target=nil) #{{{
|
|
141
|
+
Riddl::Parameter::Complex.new('result','text/xml',Answers.new(@site,@user,@language,target).xml_!(template))
|
|
142
|
+
end #}}}
|
|
143
|
+
|
|
144
|
+
# where browsers and the AMan reach the engine, proxies have to pass it on
|
|
145
|
+
def address #{{{
|
|
146
|
+
proto = @h['X_FORWARDED_PROTO'] == 'https' ? 'https' : 'http'
|
|
147
|
+
host = (@h['X_FORWARDED_HOST'] || @h['HOST']).to_s[/\A[\w.:\[\]-]+\z/]
|
|
148
|
+
prefix = @h['X_FORWARDED_PREFIX'].to_s[/\A\/[\w.~\/-]*\z/].to_s.sub(/\/+\z/,'')
|
|
149
|
+
raise CEWebS::Error.new('invalid host',400) if host.nil?
|
|
150
|
+
"#{proto}://#{host}#{prefix}"
|
|
151
|
+
end #}}}
|
|
152
|
+
# the engine is in the root of the web server
|
|
153
|
+
def base; URI.join(address + '/',"../#{@site.path}").to_s; end
|
|
154
|
+
|
|
155
|
+
# best first
|
|
156
|
+
def languages #{{{
|
|
157
|
+
ret = @h['ACCEPT_LANGUAGE'].to_s.split(',').filter_map do |l|
|
|
158
|
+
name, q = l.strip.split(/\s*;\s*q=/)
|
|
159
|
+
[-(q || 1).to_f,name] if name =~ /\A[\w-]+\z/
|
|
160
|
+
end
|
|
161
|
+
ret.sort_by.with_index { |e,i| [e[0],i] }.map(&:last)
|
|
162
|
+
end #}}}
|
|
163
|
+
|
|
164
|
+
def page #{{{
|
|
165
|
+
@site.moved
|
|
166
|
+
name = @p.value('t').to_s
|
|
167
|
+
target = begin
|
|
168
|
+
@site.target(name)
|
|
169
|
+
rescue CEWebS::Error
|
|
170
|
+
nil
|
|
171
|
+
end
|
|
172
|
+
answer :page, target
|
|
173
|
+
end #}}}
|
|
174
|
+
|
|
175
|
+
### users
|
|
176
|
+
|
|
177
|
+
def cookie!(token,days) #{{{
|
|
178
|
+
attrs = ["#{cookie}=#{token}","Path=#{URI(address).path}/#{@site.name}/",'HttpOnly','SameSite=Lax']
|
|
179
|
+
attrs << "Max-Age=#{days * 24 * 3600}" if days
|
|
180
|
+
attrs << 'Secure' if address.start_with?('https')
|
|
181
|
+
@headers << Riddl::Header.new('Set-Cookie',attrs.join('; '))
|
|
182
|
+
end #}}}
|
|
183
|
+
|
|
184
|
+
def login #{{{
|
|
185
|
+
permanent = text(2) == 'true'
|
|
186
|
+
cookie! @site.login(text(0),text(1),permanent ? 365 : 7), permanent ? 365 : nil
|
|
187
|
+
[]
|
|
188
|
+
end #}}}
|
|
189
|
+
def logout #{{{
|
|
190
|
+
@site.logout(@token)
|
|
191
|
+
cookie! '', 0
|
|
192
|
+
[]
|
|
193
|
+
end #}}}
|
|
194
|
+
|
|
195
|
+
def password #{{{
|
|
196
|
+
allow @user
|
|
197
|
+
# the password of a mail account can not be changed here
|
|
198
|
+
raise CEWebS::Error.new('wrong password',403) if @user.attributes['pass'].to_s == '' || !@site.password?(@user,text(0))
|
|
199
|
+
raise CEWebS::Error.new('password missing',400) if text(1) == ''
|
|
200
|
+
@site.password(@user,text(1),@token)
|
|
201
|
+
[]
|
|
202
|
+
end #}}}
|
|
203
|
+
|
|
204
|
+
def email #{{{
|
|
205
|
+
smtp = Site::config.find('/engine/smtp').first
|
|
206
|
+
raise CEWebS::Error.new('email not configured',501) if smtp.nil? || smtp.attributes['host'] == ''
|
|
207
|
+
person = @site.person(text(0))
|
|
208
|
+
raise CEWebS::Error.new('user not found',404) if person.nil? || person.attributes['email'].to_s == '' || person.attributes['pass'].to_s == ''
|
|
209
|
+
@site.attempt('email',person,3)
|
|
210
|
+
s = @site.strings(@language)
|
|
211
|
+
clean = lambda { |v| v.to_s.gsub(/[\r\n]+/,' ') }
|
|
212
|
+
mail = [
|
|
213
|
+
"From: #{clean.call(s.sfind('sender'))}",
|
|
214
|
+
"To: #{clean.call(person.attributes['email'])}",
|
|
215
|
+
"Subject: =?UTF-8?B?#{[s.sfind('sendsubject')].pack('m0')}?=",
|
|
216
|
+
'MIME-Version: 1.0',
|
|
217
|
+
'Content-Type: text/plain; charset=utf-8',
|
|
218
|
+
'Content-Transfer-Encoding: base64',
|
|
219
|
+
'',
|
|
220
|
+
[s.sfind('sendmessage') % [person.attributes['name'],@site.reset_link(person)]].pack('m')
|
|
221
|
+
].join("\r\n")
|
|
222
|
+
Net::SMTP.start(smtp.attributes['host'],smtp.attributes['port'].to_i) do |c|
|
|
223
|
+
c.send_message mail, clean.call(s.sfind('sender')), clean.call(person.attributes['email'])
|
|
224
|
+
end
|
|
225
|
+
[]
|
|
226
|
+
end #}}}
|
|
227
|
+
def reset #{{{
|
|
228
|
+
raise CEWebS::Error.new('password missing',400) if text(1) == ''
|
|
229
|
+
@site.reset(text(0),text(1))
|
|
230
|
+
[]
|
|
231
|
+
end #}}}
|
|
232
|
+
|
|
233
|
+
### administration
|
|
234
|
+
|
|
235
|
+
def reports #{{{
|
|
236
|
+
allow report?
|
|
237
|
+
answer :reports
|
|
238
|
+
end #}}}
|
|
239
|
+
def services #{{{
|
|
240
|
+
allow admin?
|
|
241
|
+
@site.register(address)
|
|
242
|
+
answer :services
|
|
243
|
+
end #}}}
|
|
244
|
+
def subscribe #{{{
|
|
245
|
+
allow admin?
|
|
246
|
+
@site.subscribe(text(0),text(1),text(2))
|
|
247
|
+
[]
|
|
248
|
+
end #}}}
|
|
249
|
+
def lock #{{{
|
|
250
|
+
allow admin?
|
|
251
|
+
@site.lock(@r[2],text(0) == 'true')
|
|
252
|
+
[]
|
|
253
|
+
end #}}}
|
|
254
|
+
def rename #{{{
|
|
255
|
+
allow admin?
|
|
256
|
+
raise CEWebS::Error.new('name missing',400) if text(0).strip == ''
|
|
257
|
+
@site.rename(@r[2],text(0).strip)
|
|
258
|
+
[]
|
|
259
|
+
end #}}}
|
|
260
|
+
def unsubscribe #{{{
|
|
261
|
+
allow admin?
|
|
262
|
+
@site.unsubscribe(@r[2])
|
|
263
|
+
[]
|
|
264
|
+
end #}}}
|
|
265
|
+
def entrypoints #{{{
|
|
266
|
+
allow admin?
|
|
267
|
+
node, reg = @site.service(@r[2])
|
|
268
|
+
xml :list, @site.repository(reg,@language).list("services/#{node.attributes['key']}/entrypoints")
|
|
269
|
+
end #}}}
|
|
270
|
+
def menu #{{{
|
|
271
|
+
allow admin?
|
|
272
|
+
Riddl::Parameter::Complex.new('result','text/xml',@site.custom.find('/custom/menupoints').first.dump)
|
|
273
|
+
end #}}}
|
|
274
|
+
def menu! #{{{
|
|
275
|
+
allow admin?
|
|
276
|
+
@site.menu = text(0)
|
|
277
|
+
[]
|
|
278
|
+
end #}}}
|
|
279
|
+
|
|
280
|
+
### content
|
|
281
|
+
|
|
282
|
+
def content #{{{
|
|
283
|
+
mode, command = @r[2], @r[3]
|
|
284
|
+
raise CEWebS::Error.new('not found',404) unless %w{document file chunk}.include?(mode)
|
|
285
|
+
subject = @p.value('CEWebS_t')
|
|
286
|
+
target = @site.target(@p.value('t').to_s,subject.is_a?(String) ? subject : nil)
|
|
287
|
+
allow admin? if target.name == Site::ADMINISTRATION
|
|
288
|
+
allow report? if target.name == Site::REPORT
|
|
289
|
+
raise CEWebS::Error.new(@site.strings(@language).sfind('error'),503) if target.locked
|
|
290
|
+
|
|
291
|
+
paras = parameters(target)
|
|
292
|
+
if mode == 'chunk'
|
|
293
|
+
# never cached, services have to check the user
|
|
294
|
+
_, body, headers = remote(target).call(:post,"#{target.instance}/chunk/#{command}",paras)
|
|
295
|
+
return chunk(target,body,headers)
|
|
296
|
+
end
|
|
297
|
+
body, headers = fetch(target,mode,command,paras)
|
|
298
|
+
ret = send(mode,target,body,headers)
|
|
299
|
+
timing if admin?
|
|
300
|
+
ret
|
|
301
|
+
end #}}}
|
|
302
|
+
|
|
303
|
+
### speed, in ms
|
|
304
|
+
|
|
305
|
+
def clock; Process.clock_gettime(Process::CLOCK_MONOTONIC,:float_millisecond); end
|
|
306
|
+
def timed(name) #{{{
|
|
307
|
+
start = clock
|
|
308
|
+
ret = yield
|
|
309
|
+
@times[name] = clock - start
|
|
310
|
+
ret
|
|
311
|
+
end #}}}
|
|
312
|
+
# shown by the page and the developer tools of browsers
|
|
313
|
+
def timing #{{{
|
|
314
|
+
total = clock - @begin
|
|
315
|
+
times = @times.merge(:engine => total - @times.values.sum, :total => total).map { |k,v| "#{k};dur=#{v.round(1)}" }
|
|
316
|
+
times << 'cache' if @cached
|
|
317
|
+
@headers << Riddl::Header.new('Server-Timing',times.join(', '))
|
|
318
|
+
end #}}}
|
|
319
|
+
|
|
320
|
+
def remote(target); CEWebS::Remote.new(target.url,target.key,:user => @user && @user.attributes['id'],:language => @language,:posted => @m.to_s == 'post'); end
|
|
321
|
+
|
|
322
|
+
# documents and files, services decide if the user can see them
|
|
323
|
+
def fetch(target,mode,command,paras) #{{{
|
|
324
|
+
names = paras.map { |p| p.is_a?(Riddl::Parameter::Complex) ? [p.name,p.filename] : [p.name,p.value] }
|
|
325
|
+
res = timed(:prepare) { remote(target).call(:post,"#{target.instance}/prepare/#{command}",names) }
|
|
326
|
+
prep = CEWebS::Messages::parse_prepare(res[1])
|
|
327
|
+
allow @user if prep.authenticate
|
|
328
|
+
cached(target,mode,prep.cachekey) do |modified|
|
|
329
|
+
timed(:document) { remote(target).call(:post,"#{target.instance}/#{mode}/#{command}",paras,'CEWEBS-MODIFIED' => modified) }
|
|
330
|
+
end
|
|
331
|
+
end #}}}
|
|
332
|
+
|
|
333
|
+
### search
|
|
334
|
+
|
|
335
|
+
# The cache contains pages of all users, so it only tells where to look
|
|
336
|
+
def search #{{{
|
|
337
|
+
words = text(0).split(/[\s\0]+/).reject(&:empty?).first(10)
|
|
338
|
+
services = @site.custom.find('/custom/registries/registry/service').to_h { |s| [s.attributes['key'],s.attributes['name']] }
|
|
339
|
+
pages = @site.grep(words).map { |e| [services[e[:key]],e[:href]] }.select(&:all?).uniq
|
|
340
|
+
xml :list, pages.lazy.filter_map { |name,href| hit(name,href,words) }.first(HITS)
|
|
341
|
+
end #}}}
|
|
342
|
+
|
|
343
|
+
# request the page again, nil if the user can not see it
|
|
344
|
+
def hit(name,href,words) #{{{
|
|
345
|
+
target = @site.target(name)
|
|
346
|
+
return nil if target.locked
|
|
347
|
+
url = transform(target,href)
|
|
348
|
+
query = URI.decode_www_form(url.split('?',2)[1].to_s)
|
|
349
|
+
paras = query.filter_map { |k,v| Riddl::Parameter::Simple.new($1,v) if k =~ /\ACEWebS_(.+)/ }
|
|
350
|
+
page = CEWebS::Messages::parse_document(fetch(target,'document',query.assoc('c')&.last,paras)[0]).search
|
|
351
|
+
return nil if page.nil?
|
|
352
|
+
content = Site::plain(page).downcase
|
|
353
|
+
return nil unless words.all? { |w| content.include?(w.downcase) }
|
|
354
|
+
{ :service => target.description, :href => url, :description => CGI.unescapeHTML(page[:description].to_s) }
|
|
355
|
+
rescue CEWebS::Error
|
|
356
|
+
nil
|
|
357
|
+
end #}}}
|
|
358
|
+
|
|
359
|
+
# keys never leave the engine, so the AMan and RMan get them instead of names
|
|
360
|
+
def parameters(target) #{{{
|
|
361
|
+
@p.filter_map do |p|
|
|
362
|
+
next unless p.name =~ /\ACEWebS_(.+?)(\[\])?\z/
|
|
363
|
+
name = $1
|
|
364
|
+
if p.is_a?(Riddl::Parameter::Complex)
|
|
365
|
+
Riddl::Parameter::Complex.new(name,p.mimetype,p.value,p.filename)
|
|
366
|
+
else
|
|
367
|
+
value = p.value.to_s
|
|
368
|
+
value = keys(target).invert[value] || value if name == 't' && target.registry
|
|
369
|
+
Riddl::Parameter::Simple.new(name,value)
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
end #}}}
|
|
373
|
+
def keys(target) #{{{
|
|
374
|
+
target.registry.find('service').to_h { |s| [s.attributes['key'],s.attributes['name']] }
|
|
375
|
+
end #}}}
|
|
376
|
+
def transform(target,text,base='') #{{{
|
|
377
|
+
text = @site.links(text.dup.force_encoding('UTF-8').scrub,target.name,"#{address}/#{@site.name}/",base)
|
|
378
|
+
keys(target).each { |key,name| text = text.gsub(key,name) } if target.registry
|
|
379
|
+
text
|
|
380
|
+
end #}}}
|
|
381
|
+
|
|
382
|
+
def cached(target,mode,key) #{{{
|
|
383
|
+
fname = @site.file('cache',Digest::SHA256.hexdigest([target.key,mode,key].join(' ')))
|
|
384
|
+
old = key != '' && File.exist?(fname) ? Marshal.load(File.binread(fname)) : nil
|
|
385
|
+
status, body, headers = yield(old && old[:modified])
|
|
386
|
+
@cached = status == 304
|
|
387
|
+
return old[:body], old[:headers] if status == 304 && old
|
|
388
|
+
raise CEWebS::Error.new('no content',502) if status == 304
|
|
389
|
+
headers = headers.slice('CONTENT_TYPE','CEWEBS_NAME','CEWEBS_MODIFIED','CEWEBS_TRANSFORM').transform_values(&:to_s)
|
|
390
|
+
modified = mode == 'document' ? XML::Smart.string(body).find('string(/document/modified)') : headers['CEWEBS_MODIFIED']
|
|
391
|
+
if key != '' && modified.to_s != ''
|
|
392
|
+
FileUtils.mkdir_p(@site.file('cache'),:mode => 0700)
|
|
393
|
+
page = CEWebS::Messages::parse_document(body).search if mode == 'document'
|
|
394
|
+
page ? File.write(fname + '.txt',Site::plain(page)) : FileUtils.rm_f(fname + '.txt')
|
|
395
|
+
File.binwrite(fname + ".#{Thread.current.object_id}",Marshal.dump(:modified => modified.to_s,:body => body,:headers => headers,:key => target.key,:href => page && page[:href]))
|
|
396
|
+
File.rename(fname + ".#{Thread.current.object_id}",fname)
|
|
397
|
+
end
|
|
398
|
+
[body,headers]
|
|
399
|
+
end #}}}
|
|
400
|
+
|
|
401
|
+
def document(target,body,headers) #{{{
|
|
402
|
+
doc = CEWebS::Messages::parse_document(body)
|
|
403
|
+
doc.content = transform(target,doc.content)
|
|
404
|
+
CEWebS::LISTS.each do |l|
|
|
405
|
+
doc[l] = doc[l].map { |e| e.transform_values { |v| transform(target,v) } }
|
|
406
|
+
end
|
|
407
|
+
doc.search = nil
|
|
408
|
+
xml :document, doc
|
|
409
|
+
end #}}}
|
|
410
|
+
|
|
411
|
+
def chunk(target,body,headers) #{{{
|
|
412
|
+
Riddl::Parameter::Complex.new('result',headers['CONTENT_TYPE'] || 'text/plain; charset=utf-8',transform(target,body))
|
|
413
|
+
end #}}}
|
|
414
|
+
|
|
415
|
+
# Browsers keep files, but ask every time, so only users that can still see a file get it.
|
|
416
|
+
# Proxies can change "tag" to W/"tag"
|
|
417
|
+
def unchanged?(*parts) #{{{
|
|
418
|
+
tag = Digest::SHA256.hexdigest(parts.map { |p| Digest::SHA256.digest(p.to_s) }.join)
|
|
419
|
+
@headers << Riddl::Header.new('ETag',"\"#{tag}\"")
|
|
420
|
+
@headers << Riddl::Header.new('Cache-Control','private, no-cache')
|
|
421
|
+
return false unless @m.to_s == 'get' && @h['IF_NONE_MATCH'].to_s.include?("\"#{tag}\"")
|
|
422
|
+
@status = 304
|
|
423
|
+
true
|
|
424
|
+
end #}}}
|
|
425
|
+
|
|
426
|
+
# Files are uploaded by users. They must not be able to run scripts in the name of others.
|
|
427
|
+
def file(target,body,headers) #{{{
|
|
428
|
+
mime = headers['CONTENT_TYPE'].to_s
|
|
429
|
+
name = headers['CEWEBS_NAME'].to_s
|
|
430
|
+
body = transform(target,body,base) if headers['CEWEBS_TRANSFORM'] == 'true'
|
|
431
|
+
inline = mime =~ INLINE || headers['CEWEBS_TRANSFORM'] == 'true'
|
|
432
|
+
@headers << Riddl::Header.new('Content-Disposition',"#{inline ? 'inline' : 'attachment'}; filename*=UTF-8''#{name.gsub('+','%20')}")
|
|
433
|
+
@headers << Riddl::Header.new('X-Content-Type-Options','nosniff')
|
|
434
|
+
return [] if unchanged?(mime,name,body)
|
|
435
|
+
Riddl::Parameter::Complex.new('result',mime,body)
|
|
436
|
+
end #}}}
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
# the AMan manages the configuration of the sites
|
|
440
|
+
class Administration < CEWebS::Administration
|
|
441
|
+
def authorized?(site,key) #{{{
|
|
442
|
+
Site::directory(site) && CEWebS::key?(key) && Site.new(site).custom.find('/custom/registries/registry/@key').any? { |k| k.to_s == key }
|
|
443
|
+
end #}}}
|
|
444
|
+
def directory(site); Site.new(site).file; end
|
|
445
|
+
def create(*); raise CEWebS::Error.new('not possible',403); end
|
|
446
|
+
def delete(*); raise CEWebS::Error.new('not possible',403); end
|
|
447
|
+
|
|
448
|
+
def dynamic(site,part,path) #{{{
|
|
449
|
+
case path
|
|
450
|
+
when 'strings/strings'
|
|
451
|
+
ele = XML::Smart.open_unprotected(CEWebS::data('Default','strings.default.xml')).root
|
|
452
|
+
ele.attributes['xml:lang'] = "xx-#{('a'..'z').to_a.sample(2).join}"
|
|
453
|
+
ele.dump
|
|
454
|
+
when 'persons/person'
|
|
455
|
+
doc = XML::Smart.string('<person/>')
|
|
456
|
+
{ 'id' => CEWebS::key[0..7], 'name' => 'Name', 'email' => '', 'pass' => CEWebS::Password::create(CEWebS::key), 'admin' => 'false', 'group' => '', 'team' => '' }.each { |k,v| doc.root.attributes[k] = v }
|
|
457
|
+
doc.root.dump
|
|
458
|
+
end
|
|
459
|
+
end #}}}
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
def self::sites #{{{
|
|
463
|
+
Proc.new do
|
|
464
|
+
on resource do
|
|
465
|
+
on resource 'page' do
|
|
466
|
+
run DoSite, :page if get 'target'
|
|
467
|
+
end
|
|
468
|
+
on resource 'session' do
|
|
469
|
+
run DoSite, :login if post 'login'
|
|
470
|
+
run DoSite, :logout if delete
|
|
471
|
+
end
|
|
472
|
+
on resource 'password' do
|
|
473
|
+
run DoSite, :password if put 'password'
|
|
474
|
+
run DoSite, :email if post 'user'
|
|
475
|
+
end
|
|
476
|
+
on resource 'reset' do
|
|
477
|
+
run DoSite, :reset if put 'reset'
|
|
478
|
+
end
|
|
479
|
+
on resource 'content' do
|
|
480
|
+
on resource do
|
|
481
|
+
on resource do
|
|
482
|
+
run DoSite, :content if get 'all'
|
|
483
|
+
run DoSite, :content if post 'all'
|
|
484
|
+
end
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
on resource 'search' do
|
|
488
|
+
run DoSite, :search if get 'search'
|
|
489
|
+
end
|
|
490
|
+
on resource 'reports' do
|
|
491
|
+
run DoSite, :reports if get
|
|
492
|
+
end
|
|
493
|
+
on resource 'services' do
|
|
494
|
+
run DoSite, :services if get
|
|
495
|
+
run DoSite, :subscribe if post 'service'
|
|
496
|
+
on resource do
|
|
497
|
+
run DoSite, :lock if put 'lock'
|
|
498
|
+
run DoSite, :unsubscribe if delete
|
|
499
|
+
on resource 'comment' do
|
|
500
|
+
run DoSite, :rename if put 'comment'
|
|
501
|
+
end
|
|
502
|
+
on resource 'entrypoints' do
|
|
503
|
+
run DoSite, :entrypoints if get
|
|
504
|
+
end
|
|
505
|
+
end
|
|
506
|
+
end
|
|
507
|
+
on resource 'menu' do
|
|
508
|
+
run DoSite, :menu if get
|
|
509
|
+
run DoSite, :menu! if put 'menu'
|
|
510
|
+
end
|
|
511
|
+
end
|
|
512
|
+
end
|
|
513
|
+
end #}}}
|
|
514
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<declaration xmlns="http://riddl.org/ns/declaration/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
2
|
+
<interface name="sites">
|
|
3
|
+
<xi:include href="sites.xml"/>
|
|
4
|
+
</interface>
|
|
5
|
+
<interface name="administration">
|
|
6
|
+
<xi:include href="contracts/administration.xml"/>
|
|
7
|
+
</interface>
|
|
8
|
+
<facade>
|
|
9
|
+
<tile>
|
|
10
|
+
<layer name="sites"/>
|
|
11
|
+
<layer name="administration"><apply-to>/administration</apply-to></layer>
|
|
12
|
+
</tile>
|
|
13
|
+
</facade>
|
|
14
|
+
</declaration>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Everything the page of a site (index.html) needs. The user is identified by a cookie.
|
|
3
|
+
|
|
4
|
+
GET /{site}/page user, texts, and menu. t is the current target
|
|
5
|
+
POST /{site}/session login
|
|
6
|
+
DELETE /{site}/session logout
|
|
7
|
+
PUT /{site}/password change password
|
|
8
|
+
POST /{site}/password send a link for a new password by email
|
|
9
|
+
PUT /{site}/reset set the new password, token is part of the link
|
|
10
|
+
GET /{site}/content/{mode}/{command} content of a service, mode is document, file or chunk.
|
|
11
|
+
POST /{site}/content/{mode}/{command} t is the target, parameters for the service start with CEWebS_
|
|
12
|
+
GET /{site}/search pages in the cache that contain all words of q
|
|
13
|
+
|
|
14
|
+
For users that can see reports:
|
|
15
|
+
GET /{site}/reports services that have reports
|
|
16
|
+
|
|
17
|
+
For administrators:
|
|
18
|
+
GET /{site}/services repositories, subscribed and available services
|
|
19
|
+
POST /{site}/services subscribe
|
|
20
|
+
PUT /{site}/services/{service} lock or unlock
|
|
21
|
+
PUT /{site}/services/{service}/comment rename, also menu points with the same name
|
|
22
|
+
DELETE /{site}/services/{service} delete the service and all its data
|
|
23
|
+
GET /{site}/services/{service}/entrypoints pages menu points can link to
|
|
24
|
+
GET /{site}/menu menu points
|
|
25
|
+
PUT /{site}/menu replace all menu points, see menupoints.rng
|
|
26
|
+
-->
|
|
27
|
+
<description xmlns="http://riddl.org/ns/description/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
28
|
+
<message name="all">
|
|
29
|
+
<zeroOrMore>
|
|
30
|
+
<choice>
|
|
31
|
+
<parameter name="*" type="string"/>
|
|
32
|
+
<parameter name="*" mimetype="*"/>
|
|
33
|
+
</choice>
|
|
34
|
+
</zeroOrMore>
|
|
35
|
+
</message>
|
|
36
|
+
<message name="target">
|
|
37
|
+
<optional>
|
|
38
|
+
<parameter name="t" type="string"/>
|
|
39
|
+
</optional>
|
|
40
|
+
</message>
|
|
41
|
+
<message name="login">
|
|
42
|
+
<parameter name="user" type="string"/>
|
|
43
|
+
<parameter name="password" type="string"/>
|
|
44
|
+
<parameter name="permanent" type="boolean"/>
|
|
45
|
+
</message>
|
|
46
|
+
<message name="password">
|
|
47
|
+
<parameter name="old" type="string"/>
|
|
48
|
+
<parameter name="new" type="string"/>
|
|
49
|
+
</message>
|
|
50
|
+
<message name="reset">
|
|
51
|
+
<parameter name="token" type="string"/>
|
|
52
|
+
<parameter name="new" type="string"/>
|
|
53
|
+
</message>
|
|
54
|
+
<message name="user">
|
|
55
|
+
<parameter name="user" type="string"/>
|
|
56
|
+
</message>
|
|
57
|
+
<message name="search">
|
|
58
|
+
<parameter name="q" type="string"/>
|
|
59
|
+
</message>
|
|
60
|
+
<message name="service">
|
|
61
|
+
<parameter name="registry" type="string"/>
|
|
62
|
+
<parameter name="id" type="integer"/>
|
|
63
|
+
<parameter name="comment" type="string"/>
|
|
64
|
+
</message>
|
|
65
|
+
<message name="comment">
|
|
66
|
+
<parameter name="comment" type="string"/>
|
|
67
|
+
</message>
|
|
68
|
+
<message name="lock">
|
|
69
|
+
<parameter name="locked" type="boolean"/>
|
|
70
|
+
</message>
|
|
71
|
+
<message name="menu">
|
|
72
|
+
<parameter name="menu" type="string"/>
|
|
73
|
+
</message>
|
|
74
|
+
<message name="xml">
|
|
75
|
+
<parameter name="result" mimetype="text/xml"/>
|
|
76
|
+
</message>
|
|
77
|
+
<message name="content">
|
|
78
|
+
<parameter name="result" mimetype="*"/>
|
|
79
|
+
</message>
|
|
80
|
+
|
|
81
|
+
<resource>
|
|
82
|
+
<resource>
|
|
83
|
+
<resource relative="page">
|
|
84
|
+
<get in="target" out="xml"/>
|
|
85
|
+
</resource>
|
|
86
|
+
<resource relative="session">
|
|
87
|
+
<post in="login"/>
|
|
88
|
+
<delete/>
|
|
89
|
+
</resource>
|
|
90
|
+
<resource relative="password">
|
|
91
|
+
<put in="password"/>
|
|
92
|
+
<post in="user"/>
|
|
93
|
+
</resource>
|
|
94
|
+
<resource relative="reset">
|
|
95
|
+
<put in="reset"/>
|
|
96
|
+
</resource>
|
|
97
|
+
<resource relative="content">
|
|
98
|
+
<resource>
|
|
99
|
+
<resource>
|
|
100
|
+
<get in="all" out="content"/>
|
|
101
|
+
<post in="all" out="content"/>
|
|
102
|
+
</resource>
|
|
103
|
+
</resource>
|
|
104
|
+
</resource>
|
|
105
|
+
<resource relative="search">
|
|
106
|
+
<get in="search" out="xml"/>
|
|
107
|
+
</resource>
|
|
108
|
+
<resource relative="reports">
|
|
109
|
+
<get out="xml"/>
|
|
110
|
+
</resource>
|
|
111
|
+
<resource relative="services">
|
|
112
|
+
<get out="xml"/>
|
|
113
|
+
<post in="service"/>
|
|
114
|
+
<resource>
|
|
115
|
+
<put in="lock"/>
|
|
116
|
+
<delete/>
|
|
117
|
+
<resource relative="comment">
|
|
118
|
+
<put in="comment"/>
|
|
119
|
+
</resource>
|
|
120
|
+
<resource relative="entrypoints">
|
|
121
|
+
<get out="xml"/>
|
|
122
|
+
</resource>
|
|
123
|
+
</resource>
|
|
124
|
+
</resource>
|
|
125
|
+
<resource relative="menu">
|
|
126
|
+
<get out="xml"/>
|
|
127
|
+
<put in="menu"/>
|
|
128
|
+
</resource>
|
|
129
|
+
</resource>
|
|
130
|
+
</resource>
|
|
131
|
+
</description>
|
data/menupoints.rng
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- service is the name of a service, hyperlink (command is the url), plain (only text) or spacer -->
|
|
2
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
3
|
+
<start>
|
|
4
|
+
<element name="menupoints">
|
|
5
|
+
<zeroOrMore><ref name="point"/></zeroOrMore>
|
|
6
|
+
</element>
|
|
7
|
+
</start>
|
|
8
|
+
<define name="point">
|
|
9
|
+
<element name="point">
|
|
10
|
+
<attribute name="name">
|
|
11
|
+
<data type="string"><param name="pattern">[a-z0-9]+</param></data>
|
|
12
|
+
</attribute>
|
|
13
|
+
<attribute name="service">
|
|
14
|
+
<data type="string"><param name="pattern">[a-z0-9]+</param></data>
|
|
15
|
+
</attribute>
|
|
16
|
+
<zeroOrMore>
|
|
17
|
+
<element name="text">
|
|
18
|
+
<attribute name="xml:lang"><data type="language"/></attribute>
|
|
19
|
+
<text/>
|
|
20
|
+
</element>
|
|
21
|
+
</zeroOrMore>
|
|
22
|
+
<element name="command"><text/></element>
|
|
23
|
+
<element name="parameters"><text/></element>
|
|
24
|
+
<zeroOrMore><ref name="point"/></zeroOrMore>
|
|
25
|
+
</element>
|
|
26
|
+
</define>
|
|
27
|
+
</grammar>
|