├── src ├── castor.properties ├── zh.properties ├── log4j.properties ├── Ralasafe.properties ├── Ralasafe_en.properties ├── Ralasafe_zh.properties └── org │ └── ralasafe │ └── group │ └── NodeManager.java ├── favicon.ico ├── lib ├── gson-1.6.jar ├── log4j_128.jar ├── castor │ ├── xerces.jar │ ├── castor-1.2.jar │ ├── jdbc-se2.0.jar │ ├── jta1.0.1.jar │ ├── velocity-1.5.jar │ ├── castor-1.2-jdo.jar │ ├── castor-1.2-xml.jar │ ├── castor-1.2-ddlgen.jar │ ├── velocity-dep-1.5.jar │ ├── castor-1.2-anttasks.jar │ ├── castor-1.2-codegen.jar │ └── castor-1.2-xml-schema.jar ├── commons-io-1.4.jar ├── commons-codec-1.3.jar ├── commons-logging.jar ├── commons-pool-1.2.jar ├── servlet │ ├── jsp-api.jar │ └── servlet-api.jar ├── beanshell │ └── bsh-2.0b4.jar ├── commons-dbcp-1.2.1.jar ├── commons-collections-3.1.jar ├── commons-fileupload-1.2.1.jar └── mysql │ └── mysql-connector-java-5.0.8-bin.jar ├── WebContent ├── WEB-INF │ └── ralasafe │ │ ├── jndi.properties │ │ ├── method.properties │ │ ├── app-ds.properties │ │ ├── datasources.xml │ │ ├── ralasafe-db.properties │ │ └── usermetadata.xml └── ralasafe │ ├── favicon.ico │ ├── images │ ├── add.gif │ ├── down.gif │ ├── edit.gif │ ├── expr.gif │ ├── fail.gif │ ├── file.png │ ├── logo.jpg │ ├── role.gif │ ├── root.png │ ├── top.gif │ ├── up.gif │ ├── yes.gif │ ├── blank.gif │ ├── bottom.gif │ ├── close.gif │ ├── delete.gif │ ├── folder.png │ ├── img01.jpg │ ├── img06.jpg │ ├── query.gif │ ├── schema.gif │ ├── title.gif │ ├── update.gif │ ├── dbObject.gif │ ├── dbTables.gif │ ├── dbViews.gif │ ├── exprGroup.gif │ ├── foot-bg.jpg │ ├── important.gif │ ├── item-bg.gif │ ├── navmenu.gif │ ├── overlay.png │ ├── page-bg.jpg │ ├── privilege.png │ ├── content-bg.png │ ├── folderClose.gif │ ├── folderOpen.gif │ ├── headline-bg.png │ ├── businessData.gif │ └── userCategory.gif │ ├── css │ ├── zTreeStyle │ │ └── img │ │ │ ├── edit.png │ │ │ ├── page.gif │ │ │ ├── flag │ │ │ ├── 10.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ ├── 9.png │ │ │ ├── 1_close.png │ │ │ └── 1_open.png │ │ │ ├── loading.gif │ │ │ ├── radio.png │ │ │ ├── remove.png │ │ │ ├── sim │ │ │ ├── 10.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ ├── 9.png │ │ │ ├── 1_close.png │ │ │ └── 1_open.png │ │ │ ├── checkbox.png │ │ │ ├── line_conn.gif │ │ │ ├── line_top.gif │ │ │ ├── minus_top.gif │ │ │ ├── moveArrow.png │ │ │ ├── plus_root.gif │ │ │ ├── plus_top.gif │ │ │ ├── folder_Close.gif │ │ │ ├── folder_Open.gif │ │ │ ├── line_bottom.gif │ │ │ ├── line_center.gif │ │ │ ├── minus_bottom.gif │ │ │ ├── minus_center.gif │ │ │ ├── minus_noLine.gif │ │ │ ├── minus_root.gif │ │ │ ├── plus_bottom.gif │ │ │ ├── plus_center.gif │ │ │ └── plus_noLine.gif │ ├── jTreeTheme │ │ └── classic │ │ │ ├── d.png │ │ │ ├── throbber.gif │ │ │ └── dot_for_ie.gif │ └── flick │ │ └── images │ │ ├── ui-icons_0073ea_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_666666_256x240.png │ │ ├── ui-icons_ff0084_256x240.png │ │ ├── ui-icons_ffffff_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_0_eeeeee_40x100.png │ │ ├── ui-bg_flat_55_ffffff_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_highlight-soft_25_0073ea_1x100.png │ │ ├── ui-bg_highlight-soft_50_dddddd_1x100.png │ │ └── ui-bg_highlight-soft_100_f6f6f6_1x100.png │ ├── js │ ├── validate │ │ ├── methods_pt.js │ │ ├── methods_nl.js │ │ ├── methods_de.js │ │ ├── messages_cn.js │ │ ├── messages_tw.js │ │ ├── messages_ja.js │ │ ├── messages_sk.js │ │ ├── messages_vi.js │ │ ├── messages_da.js │ │ ├── messages_hu.js │ │ ├── messages_he.js │ │ ├── messages_se.js │ │ ├── messages_th.js │ │ ├── messages_sr.js │ │ ├── messages_de.js │ │ ├── messages_cs.js │ │ ├── messages_no.js │ │ ├── messages_bg.js │ │ ├── messages_fa.js │ │ ├── messages_si.js │ │ ├── messages_ar.js │ │ ├── messages_lt.js │ │ ├── messages_it.js │ │ ├── messages_pl.js │ │ ├── messages_el.js │ │ ├── messages_es.js │ │ ├── messages_fi.js │ │ ├── messages_ca.js │ │ ├── messages_nl.js │ │ ├── messages_tr.js │ │ ├── messages_lv.js │ │ └── messages_ro.js │ └── syntaxhighlighter │ │ └── shBrushPlain.js │ ├── header.jsp │ ├── common │ ├── searchForm.jsp │ ├── nav.jsp │ └── showTestResult.jsp │ ├── query │ └── editWhereInExpr.jsp │ ├── footer.jsp │ ├── privilege │ └── editRole.jsp │ ├── demo │ └── noPrivilege.jsp │ └── businessData │ └── create.jsp ├── constants-and-commons └── org │ └── ralasafe │ ├── Checker.java │ ├── ObjectNewer.java │ ├── EntityUnExistException.java │ ├── RalasafeException.java │ ├── EntityExistException.java │ ├── WebConstants.java │ └── ResourceConstants.java ├── orm └── org │ └── ralasafe │ └── db │ ├── sql │ ├── Parameter.java │ ├── LeftOfIn.java │ ├── Operand.java │ ├── RightOfIn.java │ ├── Expression.java │ ├── SQLElement.java │ ├── Operator.java │ ├── IsNullExpression.java │ ├── IsNotNullExpression.java │ ├── Value.java │ ├── SimpleOperator.java │ ├── xml │ │ └── types │ │ │ └── .castor.cdr │ ├── RawSQL.java │ ├── Where.java │ ├── StoredProcedure.java │ ├── ValuesOfIn.java │ ├── ColumnsOfIn.java │ ├── From.java │ ├── GroupBy.java │ ├── Table.java │ ├── InExpression.java │ ├── NotInExpression.java │ ├── OrderBy.java │ ├── UserValue.java │ └── ContextValue.java │ ├── WhereElement.java │ ├── ComplexTableDeletor.java │ ├── MapStorageObjectNewer.java │ ├── Comparator.java │ ├── PstmtSetterUtil.java │ ├── GroupPart.java │ ├── SingleValueTableAdapter.java │ ├── TwoValueComparator.java │ ├── TableCreator.java │ ├── ComplexTableSaver.java │ ├── ComplexTableUpdator.java │ ├── NoValueComparator.java │ ├── MultiValueTableAdapter.java │ ├── ColumnView.java │ ├── DBLevelException.java │ ├── AbstractComparator.java │ ├── JavaBeanObjectNewer.java │ ├── OrderPart.java │ ├── ComplexWhereElement.java │ ├── MapStorgeObject.java │ ├── ColumnAdapter.java │ ├── LWhereElement.java │ ├── TableDeletor.java │ ├── Column.java │ ├── TableUpdator.java │ ├── TableSaver.java │ ├── ComplexTableSelector.java │ ├── PstmtSetter.java │ ├── TableView.java │ └── FieldWhereElement.java ├── entitlement └── org │ └── ralasafe │ ├── script │ ├── Expr.java │ ├── Script.java │ ├── Operator.java │ ├── Variable.java │ ├── DefineVariable.java │ ├── RawScript.java │ ├── SimpleOperator.java │ ├── IsNullExpr.java │ ├── IsNotNullExpr.java │ ├── UserValue.java │ ├── ContextValue.java │ ├── NotInExpr.java │ ├── InExpr.java │ └── BinaryExpr.java │ └── entitle │ ├── BusinessDataTestResult.java │ ├── UserCategoryTestResult.java │ ├── BackupManager.java │ ├── Backup.java │ └── Decision.java ├── user └── org │ └── ralasafe │ └── user │ ├── WhereElement.java │ ├── Comparator.java │ ├── GroupPart.java │ ├── NoValueComparator.java │ ├── OrderPart.java │ ├── AbstractComparator.java │ ├── ComplexWhereElement.java │ ├── LWhereElement.java │ ├── FieldWhereElement.java │ └── UserSelectCondition.java ├── util └── org │ └── ralasafe │ ├── encrypt │ ├── Encrypt.java │ ├── PlainEncrypt.java │ ├── Base64Encrypt.java │ ├── Md5Encrypt.java │ └── ShaEncrypt.java │ └── util │ ├── DefaultPageBatch.java │ └── I18N.java ├── test └── org │ └── ralasafe │ └── StartService.java ├── client └── org │ └── ralasafe │ ├── servlet │ ├── Action.java │ ├── QueryMngAction.java │ ├── BusinessDataMngAction.java │ ├── PrivilegeMngAction.java │ ├── UserCategoryMngAction.java │ ├── NonRolePrivilegeMngAction.java │ ├── BusinessDataPolicyAction.java │ ├── UserCategoryPolicyAction.java │ ├── NonRolePrivilegeTreeHandler.java │ └── PrivilegeExportAction.java │ ├── privilege │ ├── UserRole.java │ ├── RolePrivilege.java │ ├── Role.java │ ├── RoleManager.java │ └── UserRoleManager.java │ ├── userType │ └── UserTypeManager.java │ └── application │ └── ApplicationUserType.java ├── xml(mysql) └── ralasafe │ ├── userCategory │ ├── 7_ralasafe.xml │ ├── 8_ralasafe.xml │ ├── 1_ralasafe.xml │ ├── 4_ralasafe.xml │ ├── 5_ralasafe.xml │ └── 6_ralasafe.xml │ ├── businessData │ ├── 2_ralasafe.xml │ └── 3_ralasafe.xml │ ├── query │ └── -10_ralasafe.xml │ └── userType │ └── 20110620-093436-usermetadata.xml ├── xml(oracle) └── ralasafe │ ├── userCategory │ ├── 7_ralasafe.xml │ ├── 8_ralasafe.xml │ ├── 1_ralasafe.xml │ ├── 4_ralasafe.xml │ ├── 5_ralasafe.xml │ └── 6_ralasafe.xml │ ├── businessData │ ├── 2_ralasafe.xml │ └── 3_ralasafe.xml │ └── query │ └── -10_ralasafe.xml ├── sql └── create-database.sql └── demo └── org └── ralasafe └── demo ├── Company.java ├── LoanMoney.java ├── Privilege.java ├── LogoutServlet.java ├── DemoUtil.java └── LoanMoneyManager.java /src/castor.properties: -------------------------------------------------------------------------------- 1 | org.exolab.castor.indent=true -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/favicon.ico -------------------------------------------------------------------------------- /lib/gson-1.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/gson-1.6.jar -------------------------------------------------------------------------------- /lib/log4j_128.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/log4j_128.jar -------------------------------------------------------------------------------- /src/zh.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/src/zh.properties -------------------------------------------------------------------------------- /lib/castor/xerces.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/xerces.jar -------------------------------------------------------------------------------- /lib/commons-io-1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/commons-io-1.4.jar -------------------------------------------------------------------------------- /lib/castor/castor-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/castor-1.2.jar -------------------------------------------------------------------------------- /lib/castor/jdbc-se2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/jdbc-se2.0.jar -------------------------------------------------------------------------------- /lib/castor/jta1.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/jta1.0.1.jar -------------------------------------------------------------------------------- /lib/commons-codec-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/commons-codec-1.3.jar -------------------------------------------------------------------------------- /lib/commons-logging.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/commons-logging.jar -------------------------------------------------------------------------------- /lib/commons-pool-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/commons-pool-1.2.jar -------------------------------------------------------------------------------- /lib/servlet/jsp-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/servlet/jsp-api.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/ralasafe/jndi.properties: -------------------------------------------------------------------------------- 1 | type=jndi 2 | jndiName=jdbc/datasourceName 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/beanshell/bsh-2.0b4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/beanshell/bsh-2.0b4.jar -------------------------------------------------------------------------------- /lib/castor/velocity-1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/velocity-1.5.jar -------------------------------------------------------------------------------- /lib/commons-dbcp-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/commons-dbcp-1.2.1.jar -------------------------------------------------------------------------------- /lib/servlet/servlet-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/servlet/servlet-api.jar -------------------------------------------------------------------------------- /lib/castor/castor-1.2-jdo.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/castor-1.2-jdo.jar -------------------------------------------------------------------------------- /lib/castor/castor-1.2-xml.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/castor-1.2-xml.jar -------------------------------------------------------------------------------- /WebContent/ralasafe/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/favicon.ico -------------------------------------------------------------------------------- /lib/castor/castor-1.2-ddlgen.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/castor-1.2-ddlgen.jar -------------------------------------------------------------------------------- /lib/castor/velocity-dep-1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/velocity-dep-1.5.jar -------------------------------------------------------------------------------- /lib/commons-collections-3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/commons-collections-3.1.jar -------------------------------------------------------------------------------- /lib/commons-fileupload-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/commons-fileupload-1.2.1.jar -------------------------------------------------------------------------------- /WebContent/ralasafe/images/add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/add.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/down.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/edit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/edit.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/expr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/expr.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/fail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/fail.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/file.png -------------------------------------------------------------------------------- /WebContent/ralasafe/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/logo.jpg -------------------------------------------------------------------------------- /WebContent/ralasafe/images/role.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/role.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/root.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/root.png -------------------------------------------------------------------------------- /WebContent/ralasafe/images/top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/top.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/up.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/yes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/yes.gif -------------------------------------------------------------------------------- /lib/castor/castor-1.2-anttasks.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/castor-1.2-anttasks.jar -------------------------------------------------------------------------------- /lib/castor/castor-1.2-codegen.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/castor-1.2-codegen.jar -------------------------------------------------------------------------------- /WebContent/ralasafe/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/blank.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/bottom.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/close.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/delete.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/delete.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/folder.png -------------------------------------------------------------------------------- /WebContent/ralasafe/images/img01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/img01.jpg -------------------------------------------------------------------------------- /WebContent/ralasafe/images/img06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/img06.jpg -------------------------------------------------------------------------------- /WebContent/ralasafe/images/query.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/query.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/schema.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/schema.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/title.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/title.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/update.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/update.gif -------------------------------------------------------------------------------- /lib/castor/castor-1.2-xml-schema.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/castor/castor-1.2-xml-schema.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/ralasafe/method.properties: -------------------------------------------------------------------------------- 1 | type=method 2 | class=com.yourcompany.db.DataSourceProvider 3 | method=getDatasource -------------------------------------------------------------------------------- /WebContent/ralasafe/images/dbObject.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/dbObject.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/dbTables.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/dbTables.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/dbViews.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/dbViews.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/exprGroup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/exprGroup.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/foot-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/foot-bg.jpg -------------------------------------------------------------------------------- /WebContent/ralasafe/images/important.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/important.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/item-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/item-bg.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/navmenu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/navmenu.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/overlay.png -------------------------------------------------------------------------------- /WebContent/ralasafe/images/page-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/page-bg.jpg -------------------------------------------------------------------------------- /WebContent/ralasafe/images/privilege.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/privilege.png -------------------------------------------------------------------------------- /WebContent/ralasafe/images/content-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/content-bg.png -------------------------------------------------------------------------------- /WebContent/ralasafe/images/folderClose.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/folderClose.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/folderOpen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/folderOpen.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/headline-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/headline-bg.png -------------------------------------------------------------------------------- /WebContent/ralasafe/images/businessData.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/businessData.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/images/userCategory.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/images/userCategory.gif -------------------------------------------------------------------------------- /lib/mysql/mysql-connector-java-5.0.8-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/lib/mysql/mysql-connector-java-5.0.8-bin.jar -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/edit.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/page.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/jTreeTheme/classic/d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/jTreeTheme/classic/d.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/10.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/2.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/3.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/4.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/5.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/6.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/7.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/8.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/9.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/loading.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/radio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/radio.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/remove.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/10.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/2.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/3.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/4.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/5.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/6.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/7.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/8.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/9.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/checkbox.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/line_conn.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/line_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/line_top.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/minus_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/minus_top.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/moveArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/moveArrow.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/plus_root.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/plus_root.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/plus_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/plus_top.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/jTreeTheme/classic/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/jTreeTheme/classic/throbber.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/1_close.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/flag/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/flag/1_open.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/folder_Close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/folder_Close.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/folder_Open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/folder_Open.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/line_bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/line_bottom.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/line_center.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/line_center.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/minus_bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/minus_bottom.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/minus_center.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/minus_center.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/minus_noLine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/minus_noLine.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/minus_root.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/minus_root.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/plus_bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/plus_bottom.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/plus_center.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/plus_center.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/plus_noLine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/plus_noLine.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/1_close.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/zTreeStyle/img/sim/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/zTreeStyle/img/sim/1_open.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/jTreeTheme/classic/dot_for_ie.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/jTreeTheme/classic/dot_for_ie.gif -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-icons_0073ea_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-icons_0073ea_256x240.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-icons_666666_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-icons_666666_256x240.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-icons_ff0084_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-icons_ff0084_256x240.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-bg_flat_0_eeeeee_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-bg_flat_0_eeeeee_40x100.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-bg_flat_55_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-bg_flat_55_ffffff_40x100.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-bg_highlight-soft_25_0073ea_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-bg_highlight-soft_25_0073ea_1x100.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png -------------------------------------------------------------------------------- /WebContent/ralasafe/css/flick/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loafer/ralasafe/master/WebContent/ralasafe/css/flick/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png -------------------------------------------------------------------------------- /WebContent/WEB-INF/ralasafe/app-ds.properties: -------------------------------------------------------------------------------- 1 | jdbcDriver=com.mysql.jdbc.Driver 2 | jdbcUrl=jdbc:mysql://localhost/mydemo?useUnicode=true 3 | jdbcUser=root 4 | jdbcPassword=1234 5 | 6 | connectionPoolMaxSize=10 7 | connectionPoolMaxIdle=2 8 | connectionPoolMaxWait=60000 9 | connectionPoolMinSize=0 -------------------------------------------------------------------------------- /constants-and-commons/org/ralasafe/Checker.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe; 6 | 7 | public interface Checker { 8 | } 9 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/Parameter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public interface Parameter { 8 | } 9 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/methods_pt.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Localized default methods for the jQuery validation plugin. 3 | * Locale: PT_BR 4 | */ 5 | jQuery.extend(jQuery.validator.methods, { 6 | date: function(value, element) { 7 | return this.optional(element) || /^\d\d?\/\d\d?\/\d\d\d?\d?$/.test(value); 8 | } 9 | }); -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/Expr.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public interface Expr extends Script{ 8 | } 9 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/LeftOfIn.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public interface LeftOfIn extends SQLElement{ 8 | } 9 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/Operand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public interface Operand extends SQLElement { 8 | } 9 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/RightOfIn.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public interface RightOfIn extends SQLElement{ 8 | } 9 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/methods_nl.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Localized default methods for the jQuery validation plugin. 3 | * Locale: NL 4 | */ 5 | jQuery.extend(jQuery.validator.methods, { 6 | date: function(value, element) { 7 | return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value); 8 | } 9 | }); -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/Expression.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public interface Expression extends SQLElement{ 8 | } 9 | -------------------------------------------------------------------------------- /user/org/ralasafe/user/WhereElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | public interface WhereElement { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /constants-and-commons/org/ralasafe/ObjectNewer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe; 6 | 7 | public interface ObjectNewer { 8 | public Object newObject(); 9 | } 10 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/entitle/BusinessDataTestResult.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.entitle; 6 | 7 | public class BusinessDataTestResult extends ScriptTestResult{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/entitle/UserCategoryTestResult.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.entitle; 6 | 7 | public class UserCategoryTestResult extends ScriptTestResult{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/WhereElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * WARNING!!!! 9 | * We will deprecate it later. 10 | */ 11 | public interface WhereElement { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.category.org.ralasafe=DEBUG,CONSOLE 2 | 3 | # print to console 4 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender 5 | log4j.appender.CONSOLE.Threshold=DEBUG 6 | log4j.appender.CONSOLE.Target=System.out 7 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.CONSOLE.layout.ConversionPattern=%-5p [%d{yyyy-MM-dd HH:mm:ss}] %c- %m%n -------------------------------------------------------------------------------- /user/org/ralasafe/user/Comparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | 8 | public interface Comparator { 9 | /** 10 | * 11 | * @return 12 | */ 13 | public String getType(); 14 | } 15 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/Script.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public interface Script{ 8 | /** 9 | * Generate java script 10 | * @return 11 | */ 12 | public String toScript(); 13 | } 14 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/SQLElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public interface SQLElement { 8 | 9 | /** 10 | * Generate SQL. 11 | * @return 12 | */ 13 | public abstract String toSQL(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/ralasafe/datasources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/ComplexTableDeletor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | public interface ComplexTableDeletor { 8 | public void setComplexTable( ComplexTable complexTable ); 9 | public void delete( Object o ) throws DBLevelException; 10 | } 11 | -------------------------------------------------------------------------------- /util/org/ralasafe/encrypt/Encrypt.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.encrypt; 6 | 7 | public interface Encrypt { 8 | /** 9 | * Encrypt some text 10 | * @param rawTxt 11 | * @return 12 | */ 13 | public String encrypt( String rawTxt ); 14 | } 15 | -------------------------------------------------------------------------------- /test/org/ralasafe/StartService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010 Wang Jinbao, http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe; 6 | 7 | import org.ralasafe.util.Startup; 8 | 9 | public class StartService { 10 | public static void startup() { 11 | Startup.startup( 12 | "./WebContent/WEB-INF/ralasafe", 13 | "./xml"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/methods_de.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Localized default methods for the jQuery validation plugin. 3 | * Locale: DE 4 | */ 5 | jQuery.extend(jQuery.validator.methods, { 6 | date: function(value, element) { 7 | return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value); 8 | }, 9 | number: function(value, element) { 10 | return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value); 11 | } 12 | }); -------------------------------------------------------------------------------- /orm/org/ralasafe/db/MapStorageObjectNewer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import org.ralasafe.ObjectNewer; 8 | 9 | public class MapStorageObjectNewer implements ObjectNewer { 10 | public Object newObject() { 11 | return new MapStorgeObject(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /util/org/ralasafe/encrypt/PlainEncrypt.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.encrypt; 6 | 7 | 8 | /** 9 | * Don't encrypt. Return rawtxt. 10 | * 11 | */ 12 | public class PlainEncrypt implements Encrypt { 13 | public String encrypt( String rawTxt ) { 14 | return rawTxt; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WebContent/ralasafe/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@page import="org.ralasafe.util.I18N"%> 4 | <% 5 | I18N i18n=I18N.getWebInstance( request ); 6 | %> 7 |
8 |
9 | > <%=i18n.say( "ralasafe_title" ) %> 10 |
11 | 12 |
13 |

14 | <%=i18n.say( "ralasafe_vision" ) %> 15 |

16 |
17 |
-------------------------------------------------------------------------------- /user/org/ralasafe/user/GroupPart.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | public class GroupPart { 8 | private String[] name; 9 | 10 | public String[] getNames() { 11 | return name; 12 | } 13 | public void setNames( String[] names ) { 14 | this.name = names; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WebContent/ralasafe/common/searchForm.jsp: -------------------------------------------------------------------------------- 1 | <% 2 | /** 3 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 4 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | %> 7 | 8 | <% if( !searchName.equals("")||totalNumber>15 ) { %> 9 |
10 | 11 | " /> 12 |
13 | <% } %> -------------------------------------------------------------------------------- /orm/org/ralasafe/db/Comparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * Compare operator. 9 | * 10 | * @author Wang Jinbao 11 | * 12 | */ 13 | public interface Comparator { 14 | /** 15 | * Compare type 16 | * @return 17 | */ 18 | public String getType(); 19 | } 20 | -------------------------------------------------------------------------------- /WebContent/ralasafe/query/editWhereInExpr.jsp: -------------------------------------------------------------------------------- 1 | <% 2 | /** 3 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 4 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | %> 7 | <%@ page language="java" contentType="text/html; charset=UTF-8" 8 | pageEncoding="UTF-8"%> 9 | 10 | We will support later! Sorry for inconvenience. 11 | 12 |
13 | You can try your requirement in manual mode. -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/Operator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public abstract class Operator implements SQLElement{ 8 | private String value; 9 | 10 | public String getValue() { 11 | return value; 12 | } 13 | 14 | public void setValue( String value ) { 15 | this.value=value; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/Operator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public abstract class Operator implements Script { 8 | private String value; 9 | 10 | public String getValue() { 11 | return value; 12 | } 13 | 14 | public void setValue( String value ) { 15 | this.value=value; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/Variable.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public class Variable implements Script { 8 | private String name; 9 | public String toScript() { 10 | return name; 11 | } 12 | public String getName() { 13 | return name; 14 | } 15 | public void setName( String name ) { 16 | this.name=name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /util/org/ralasafe/util/DefaultPageBatch.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.util; 6 | 7 | import java.util.Collection; 8 | 9 | public class DefaultPageBatch extends PageBatch { 10 | public void doInPage( Object[] objs ) throws Exception { 11 | //DO NOTHING 12 | } 13 | 14 | public void doInPage( Collection coll ) throws Exception { 15 | //DO NOTHING 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WebContent/ralasafe/footer.jsp: -------------------------------------------------------------------------------- 1 | <% 2 | /** 3 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 4 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | %> 7 | <%@ page language="java" contentType="text/html; charset=UTF-8" 8 | pageEncoding="UTF-8"%> 9 | -------------------------------------------------------------------------------- /src/Ralasafe.properties: -------------------------------------------------------------------------------- 1 | Designer: Designer 2 | noPrivilege: You have no privilege of ''{0}''. 3 | noPrivilegeForQueryPolicy: You have no privilege of ''{0}''. Return an empty collection. 4 | noQueryPolicyMatched: No policy matched. Return an empty collection. 5 | reservedUserCategoryName: Role 6 | ralasafeAdmin: Ralasafe Admin 7 | policyAdmin: Policy Admin 8 | AssignRoleToUser: Assign Role To User 9 | RoleAdmin: Role Admin 10 | policyAdminDescription: Define policy, user category, business data and query. 11 | ralasafeAdministrator: Ralasafe Administrator 12 | error: Error -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/DefineVariable.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public abstract class DefineVariable implements Script { 8 | private String variableName; 9 | 10 | public final String getVariableName() { 11 | return variableName; 12 | } 13 | public final void setVariableName( String variableName ) { 14 | this.variableName=variableName; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Ralasafe_en.properties: -------------------------------------------------------------------------------- 1 | Designer: Designer 2 | noPrivilege: You have no privilege of ''{0}''. 3 | noPrivilegeForQueryPolicy: You have no privilege of ''{0}''. Return an empty collection. 4 | noQueryPolicyMatched: No policy matched. Return an empty collection. 5 | reservedUserCategoryName: Role 6 | ralasafeAdmin: Ralasafe Admin 7 | policyAdmin: Policy Admin 8 | AssignRoleToUser: Assign Role To User 9 | RoleAdmin: Role Admin 10 | policyAdminDescription: Define policy, user category, business data and query. 11 | ralasafeAdministrator: Ralasafe Administrator 12 | error: Error -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/RawScript.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public class RawScript { 8 | private String content = ""; 9 | 10 | public String getContent() { 11 | return content; 12 | } 13 | 14 | public void setContent(String content) { 15 | this.content = content; 16 | } 17 | 18 | public String toScript() { 19 | return content; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/PstmtSetterUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | 8 | public class PstmtSetterUtil { 9 | public static PstmtSetter getSetter( String fieldClassName ) { 10 | if( "java.util.Date".equalsIgnoreCase( fieldClassName ) ) { 11 | return new PstmtSetter.JavaUtilDatePstmtSetter(); 12 | } else { 13 | return new PstmtSetter.ObjectPstmtSetter(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/Action.java: -------------------------------------------------------------------------------- 1 | package org.ralasafe.servlet; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.ServletException; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | public abstract class Action { 10 | protected void doGet( HttpServletRequest req, HttpServletResponse resp ) 11 | throws ServletException, IOException{ 12 | 13 | } 14 | 15 | protected void doPost( HttpServletRequest req, HttpServletResponse resp ) 16 | throws ServletException, IOException { 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/GroupPart.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * Group part of a sql. 9 | * 10 | * @author jbwang 11 | * 12 | */ 13 | public class GroupPart { 14 | private String[] columnNames; 15 | 16 | public String[] getColumnNames() { 17 | return columnNames; 18 | } 19 | public void setColumnNames( String[] columnNames ) { 20 | this.columnNames = columnNames; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/userCategory/7_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | a 5 | 6 | 7 | 8 | 9 | = 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /xml(oracle)/ralasafe/userCategory/7_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | a 5 | 6 | 7 | 8 | 9 | = 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/SingleValueTableAdapter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import org.ralasafe.ObjectNewer; 8 | 9 | public interface SingleValueTableAdapter { 10 | //public void setComplexTable( ComplexTable table ); 11 | public Object extract( Object o ); 12 | public Object extractEvenNoValueExist( Object o ); 13 | public void combine( Object o, Object extractValue ); 14 | public ObjectNewer getObjectNewer(); 15 | } 16 | -------------------------------------------------------------------------------- /user/org/ralasafe/user/NoValueComparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | public class NoValueComparator extends AbstractComparator { 8 | private NoValueComparator( String type ) { 9 | setType( type ); 10 | } 11 | 12 | public static final NoValueComparator IS_NULL = 13 | new NoValueComparator( "IS NULL" ); 14 | public static final NoValueComparator NOT_NULL = 15 | new NoValueComparator( "IS NOT NULL" ); 16 | } 17 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/TwoValueComparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | public class TwoValueComparator extends AbstractComparator { 8 | private TwoValueComparator( String type ) { 9 | setType( type ); 10 | } 11 | 12 | public static final TwoValueComparator BETWEEN = 13 | new TwoValueComparator( "BETWEEN" ); 14 | public static final TwoValueComparator NOT_BETWEEN = 15 | new TwoValueComparator( "NOT BETWEEN" ); 16 | } 17 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/QueryMngAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import org.ralasafe.entitle.QueryManager; 10 | 11 | public class QueryMngAction extends AbstractTreeAction{ 12 | public AbstractTreeHandler createTreeHandler(HttpServletRequest req){ 13 | QueryManager manager=WebUtil.getQueryManager(req); 14 | return new QueryTreeHandler(manager); 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/TableCreator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | public interface TableCreator { 8 | /** 9 | * Does table exist in a datasource? 10 | * @see {@link DBPower#getConnection(long)} 11 | * @param table 12 | * @return 13 | */ 14 | public boolean exist( Table table ) throws DBLevelException; 15 | 16 | /** 17 | * Create it. 18 | * @param table 19 | */ 20 | public void create( Table table ) throws DBLevelException; 21 | } 22 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/ComplexTableSaver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import org.ralasafe.EntityExistException; 8 | 9 | 10 | public interface ComplexTableSaver { 11 | public void setComplexTable( ComplexTable complexTable ); 12 | public void setSingleValueAdapters( SingleValueTableAdapter[] adapters ); 13 | public void setMultiValueAdapters( MultiValueTableAdapter[] adapters ); 14 | public void save( Object o ) throws DBLevelException, EntityExistException; 15 | } -------------------------------------------------------------------------------- /orm/org/ralasafe/db/ComplexTableUpdator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import org.ralasafe.EntityExistException; 8 | 9 | public interface ComplexTableUpdator { 10 | public void setComplexTable( ComplexTable complexTable ); 11 | public void setSingleValueAdapters( SingleValueTableAdapter[] adapters ); 12 | public void setMultiValueAdapters( MultiValueTableAdapter[] adapters ); 13 | public void update( Object o ) throws EntityExistException, DBLevelException; 14 | } 15 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/userCategory/8_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 1 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /xml(oracle)/ralasafe/userCategory/8_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 1 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /constants-and-commons/org/ralasafe/EntityUnExistException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe; 6 | 7 | 8 | /** 9 | * Related to EntityExistException, the entity is not exist. 10 | * @author back 11 | * 12 | */ 13 | public class EntityUnExistException extends Exception { 14 | private Object entity; 15 | 16 | public EntityUnExistException( Object entity ) { 17 | this.entity = entity; 18 | } 19 | 20 | public Object getEntity() { 21 | return entity; 22 | } 23 | } -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/SimpleOperator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | /** 8 | * Operators: =, !=, <=, <, >=, > 9 | */ 10 | public class SimpleOperator extends Operator { 11 | public String toScript() { 12 | StringBuffer buff=new StringBuffer(); 13 | String operator=getValue(); 14 | if( getValue().equals( "=" ) ) { 15 | operator="=="; 16 | } 17 | buff.append( " " ).append( operator ).append( " " ); 18 | return buff.toString(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/BusinessDataMngAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import org.ralasafe.entitle.BusinessDataManager; 10 | 11 | public class BusinessDataMngAction extends AbstractTreeAction{ 12 | public AbstractTreeHandler createTreeHandler(HttpServletRequest req){ 13 | BusinessDataManager manager=WebUtil.getBusinessDataManager(req); 14 | return new BusinessDataTreeHandler(manager); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/userCategory/1_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -1 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /xml(oracle)/ralasafe/userCategory/1_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -1 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /util/org/ralasafe/encrypt/Base64Encrypt.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.encrypt; 6 | 7 | import org.apache.commons.codec.binary.Base64; 8 | 9 | /** 10 | * Need org.apache.commons.codec.binary.Base64 as a libary. 11 | * 12 | */ 13 | public class Base64Encrypt implements Encrypt { 14 | public String encrypt( String rawTxt ) { 15 | if( rawTxt==null ) { 16 | return null; 17 | } 18 | 19 | return new String( Base64.encodeBase64( rawTxt.getBytes() ) ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/PrivilegeMngAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import org.ralasafe.privilege.PrivilegeManager; 10 | 11 | public class PrivilegeMngAction extends AbstractTreeAction{ 12 | public AbstractTreeHandler createTreeHandler(HttpServletRequest req){ 13 | PrivilegeManager manager=WebUtil.getPrivilegeManager(req); 14 | return new PrivilegeTreeHandler(manager); 15 | } 16 | 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/UserCategoryMngAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import org.ralasafe.entitle.UserCategoryManager; 10 | 11 | public class UserCategoryMngAction extends AbstractTreeAction { 12 | public AbstractTreeHandler createTreeHandler( HttpServletRequest req ) { 13 | UserCategoryManager manager=WebUtil.getUserCategoryManager( req ); 14 | 15 | return new UserCategoryTreeHandler( manager ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/NoValueComparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * WARN!!!! 9 | * We will deprecate it later. 10 | */ 11 | public class NoValueComparator extends AbstractComparator { 12 | private NoValueComparator( String type ) { 13 | setType( type ); 14 | } 15 | 16 | public static final NoValueComparator IS_NULL = 17 | new NoValueComparator( "IS NULL" ); 18 | public static final NoValueComparator NOT_NULL = 19 | new NoValueComparator( "IS NOT NULL" ); 20 | } 21 | -------------------------------------------------------------------------------- /user/org/ralasafe/user/OrderPart.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | public class OrderPart { 8 | private String[] names; 9 | private String[] orderTypes; 10 | 11 | public String[] getNames() { 12 | return names; 13 | } 14 | public void setNames( String[] names ) { 15 | this.names = names; 16 | } 17 | public String[] getOrderTypes() { 18 | return orderTypes; 19 | } 20 | public void setOrderTypes( String[] orderTypes ) { 21 | this.orderTypes = orderTypes; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /constants-and-commons/org/ralasafe/RalasafeException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe; 6 | 7 | public class RalasafeException extends RuntimeException { 8 | public RalasafeException() { 9 | super(); 10 | } 11 | 12 | public RalasafeException( String message, Throwable cause ) { 13 | super( message, cause ); 14 | } 15 | 16 | public RalasafeException( String message ) { 17 | super( message ); 18 | } 19 | 20 | public RalasafeException( Throwable cause ) { 21 | super( cause ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/MultiValueTableAdapter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import org.ralasafe.ObjectNewer; 8 | 9 | /** 10 | * WARN!!!! 11 | * We will deprecate it later. 12 | */ 13 | public interface MultiValueTableAdapter { 14 | //public void setComplexTable( ComplexTable table ); 15 | public Object[] extract( Object o ); 16 | public Object extractEvenNoValueExist( Object o ); 17 | public void combine( Object o, Object[] extractValues ); 18 | public ObjectNewer getObjectNewer(); 19 | } 20 | -------------------------------------------------------------------------------- /util/org/ralasafe/encrypt/Md5Encrypt.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.encrypt; 6 | 7 | import org.apache.commons.codec.digest.DigestUtils; 8 | 9 | /** 10 | * Use MD5 encrypt, then hex to string. 11 | * Need: org.apache.commons.codec.digest.DigestUtils as libary. 12 | * 13 | */ 14 | public class Md5Encrypt implements Encrypt { 15 | public String encrypt( String rawTxt ) { 16 | if( rawTxt==null ) { 17 | return null; 18 | } 19 | return DigestUtils.md5Hex( rawTxt ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /util/org/ralasafe/encrypt/ShaEncrypt.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.encrypt; 6 | 7 | import org.apache.commons.codec.digest.DigestUtils; 8 | 9 | /** 10 | * Use SHA encrypt, then hex to string. 11 | * Need org.apache.commons.codec.digest.DigestUtils as libary. 12 | * 13 | */ 14 | public class ShaEncrypt implements Encrypt { 15 | public String encrypt( String rawTxt ) { 16 | if( rawTxt==null ) { 17 | return null; 18 | } 19 | return DigestUtils.shaHex( rawTxt ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/NonRolePrivilegeMngAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import org.ralasafe.privilege.PrivilegeManager; 10 | 11 | public class NonRolePrivilegeMngAction extends AbstractTreeAction{ 12 | 13 | 14 | public AbstractTreeHandler createTreeHandler(HttpServletRequest req) { 15 | PrivilegeManager manager=WebUtil.getPrivilegeManager(req); 16 | return new NonRolePrivilegeTreeHandler(manager); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /sql/create-database.sql: -------------------------------------------------------------------------------- 1 | 2 | -- ralasafe schema 3 | 4 | CREATE TABLE ralasafe_sequence ( 5 | currentValue int, 6 | name varchar(100) not null, 7 | primary key( name ) 8 | ); 9 | 10 | CREATE TABLE usertype ( 11 | name varchar(100) not null, 12 | description varchar(500), 13 | userMetadataXML varchar(4000), 14 | PRIMARY KEY(name) 15 | ); 16 | 17 | CREATE TABLE application ( 18 | name varchar(100) not null, 19 | description varchar(500), 20 | PRIMARY KEY(name) 21 | ); 22 | 23 | CREATE TABLE applicationusertype ( 24 | appName varchar(100) not null, 25 | userTypeName varchar(100) not null, 26 | userMetadataStr varchar(1000), 27 | PRIMARY KEY(appName, userTypeName) 28 | ); 29 | 30 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/IsNullExpression.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public class IsNullExpression implements Expression { 8 | private Column column; 9 | 10 | public String toSQL() { 11 | StringBuffer buf=new StringBuffer(); 12 | buf.append( " " ).append( column.toSQL() ).append( " IS NULL " ); 13 | return buf.toString(); 14 | } 15 | 16 | public Column getColumn() { 17 | return column; 18 | } 19 | 20 | public void setColumn(Column column) { 21 | this.column = column; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/IsNotNullExpression.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public class IsNotNullExpression implements Expression { 8 | private Column column; 9 | 10 | public String toSQL() { 11 | StringBuffer buf=new StringBuffer(); 12 | buf.append( " " ).append( column.toSQL() ).append( " IS NOT NULL " ); 13 | return buf.toString(); 14 | } 15 | 16 | public Column getColumn() { 17 | return column; 18 | } 19 | 20 | public void setColumn(Column column) { 21 | this.column = column; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/entitle/BackupManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.entitle; 6 | 7 | import java.io.OutputStream; 8 | import java.util.Collection; 9 | 10 | import org.ralasafe.EntityExistException; 11 | 12 | public interface BackupManager { 13 | public Backup addBackup(Backup backup) throws EntityExistException; 14 | 15 | public void updateBackup(Backup backup); 16 | 17 | public Collection getBackups(); 18 | 19 | public Backup getBackup(int id); 20 | 21 | public void exportBackup(int id, OutputStream out); 22 | } 23 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/ColumnView.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * Class for ui, display sql table column. 9 | */ 10 | public class ColumnView { 11 | private String name; 12 | private String sqlType; 13 | 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName( String name ) { 19 | this.name=name; 20 | } 21 | 22 | public String getSqlType() { 23 | return sqlType; 24 | } 25 | 26 | public void setSqlType( String sqlType ) { 27 | this.sqlType=sqlType; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/DBLevelException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import org.ralasafe.RalasafeException; 8 | 9 | public class DBLevelException extends RalasafeException { 10 | public DBLevelException() { 11 | super(); 12 | } 13 | 14 | public DBLevelException( String message, Throwable cause ) { 15 | super( message, cause ); 16 | } 17 | 18 | public DBLevelException( String message ) { 19 | super( message ); 20 | } 21 | 22 | public DBLevelException( Throwable cause ) { 23 | super( cause ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/AbstractComparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | public abstract class AbstractComparator implements Comparator { 8 | private String type; 9 | 10 | public String getType() { 11 | return type; 12 | } 13 | 14 | public void setType( String type ) { 15 | this.type = type; 16 | } 17 | 18 | public boolean equals( Object obj ) { 19 | if( obj != null && obj instanceof AbstractComparator ) { 20 | return type.equals( ( ( AbstractComparator ) obj ).getType() ); 21 | } else { 22 | return false; 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /constants-and-commons/org/ralasafe/EntityExistException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe; 6 | 7 | 8 | /** 9 | * The entity requested is already exist. 10 | * 11 | *

Just like when you add a user(already exist user) to db, Then raise EntityExistException. 12 | * @author back 13 | * 14 | */ 15 | public class EntityExistException extends Exception { 16 | 17 | private Object entity; 18 | 19 | public EntityExistException( Object entity ) { 20 | this.entity = entity; 21 | } 22 | 23 | public Object getEntity() { 24 | return entity; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /user/org/ralasafe/user/AbstractComparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | public abstract class AbstractComparator implements Comparator { 8 | private String type; 9 | 10 | public String getType() { 11 | return type; 12 | } 13 | 14 | public void setType( String type ) { 15 | this.type = type; 16 | } 17 | 18 | public boolean equals( Object obj ) { 19 | if( obj != null && obj instanceof AbstractComparator ) { 20 | return type.equals( ( ( AbstractComparator ) obj ).getType() ); 21 | } else { 22 | return false; 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/businessData/2_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5000 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | > 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /xml(oracle)/ralasafe/businessData/2_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5000 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | > 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/IsNullExpr.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public class IsNullExpr implements Expr { 8 | private Variable variable; 9 | 10 | /** 11 | * Script likes: v == null 12 | */ 13 | public String toScript() { 14 | StringBuffer buff=new StringBuffer(); 15 | String v=variable.toScript(); 16 | buff.append( v ).append( " == null" ); 17 | return buff.toString(); 18 | } 19 | 20 | public Variable getVariable() { 21 | return variable; 22 | } 23 | 24 | public void setVariable( Variable variable ) { 25 | this.variable=variable; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/userCategory/4_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /xml(oracle)/ralasafe/userCategory/4_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/IsNotNullExpr.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public class IsNotNullExpr implements Expr { 8 | private Variable variable; 9 | 10 | /** 11 | * script likes: v != null 12 | */ 13 | public String toScript() { 14 | StringBuffer buff=new StringBuffer(); 15 | String v=variable.toScript(); 16 | buff.append( v ).append( " != null" ); 17 | return buff.toString(); 18 | } 19 | 20 | public Variable getVariable() { 21 | return variable; 22 | } 23 | 24 | public void setVariable( Variable variable ) { 25 | this.variable=variable; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/JavaBeanObjectNewer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import org.ralasafe.ObjectNewer; 8 | 9 | public class JavaBeanObjectNewer implements ObjectNewer { 10 | 11 | private Class clas; 12 | 13 | public JavaBeanObjectNewer(String className) { 14 | try { 15 | clas = Class.forName(className); 16 | } catch (ClassNotFoundException e) { 17 | e.printStackTrace(); 18 | } 19 | } 20 | 21 | public Object newObject() { 22 | try { 23 | return clas.newInstance(); 24 | } catch (Exception e) { 25 | e.printStackTrace(); 26 | return null; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /user/org/ralasafe/user/ComplexWhereElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | public class ComplexWhereElement implements WhereElement { 8 | private WhereElement firstPart; 9 | private LWhereElement[] linkedParts; 10 | 11 | public WhereElement getFirstPart() { 12 | return firstPart; 13 | } 14 | public void setFirstPart( WhereElement firstPart ) { 15 | this.firstPart = firstPart; 16 | } 17 | public LWhereElement[] getLinkedParts() { 18 | return linkedParts; 19 | } 20 | public void setLinkedParts( LWhereElement[] linkedParts ) { 21 | this.linkedParts = linkedParts; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/userCategory/5_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /xml(oracle)/ralasafe/userCategory/5_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/OrderPart.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * WARN!!!! 9 | * We will deprecate it later. 10 | * 11 | */ 12 | public class OrderPart { 13 | private String[] columnNames; 14 | private String[] orderTypes; 15 | 16 | public String[] getColumnNames() { 17 | return columnNames; 18 | } 19 | public void setColumnNames( String[] columnNames ) { 20 | this.columnNames = columnNames; 21 | } 22 | public String[] getOrderTypes() { 23 | return orderTypes; 24 | } 25 | public void setOrderTypes( String[] orderTypes ) { 26 | this.orderTypes = orderTypes; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/userCategory/6_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 3 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /xml(oracle)/ralasafe/userCategory/6_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 3 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | = 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /client/org/ralasafe/privilege/UserRole.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.privilege; 6 | 7 | public class UserRole { 8 | private Object userId; 9 | private int roleId; 10 | public Object getUserId() { 11 | return userId; 12 | } 13 | public void setUserId(Object userId) { 14 | this.userId = userId; 15 | } 16 | public int getRoleId() { 17 | return roleId; 18 | } 19 | public void setRoleId(int roleId) { 20 | this.roleId = roleId; 21 | } 22 | 23 | public UserRole() {} 24 | 25 | public UserRole(Object userId, int roleId) 26 | { 27 | this.userId = userId; 28 | this.roleId = roleId; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/Value.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.Map; 8 | 9 | import org.ralasafe.user.User; 10 | 11 | public interface Value extends Operand, Parameter { 12 | /** 13 | * Indicate this value is for a LIKE operator or not? 14 | * @param behind if true, for LIKE operator 15 | */ 16 | public void setBehindLike(boolean behind); 17 | 18 | /** 19 | * Indicate this value is for a LIKE operator or not? 20 | * @return return true if it's for LIKE operator 21 | */ 22 | public boolean isBehindLike(); 23 | 24 | public abstract Object getValue(User user, Map context); 25 | } 26 | -------------------------------------------------------------------------------- /user/org/ralasafe/user/LWhereElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | public class LWhereElement { 8 | public static final String AND_LINK_TYPE="AND"; 9 | public static final String OR_LINK_TYPE="OR"; 10 | 11 | private String linkerType; 12 | private WhereElement whereElement; 13 | 14 | public String getLinkType() { 15 | return linkerType; 16 | } 17 | public void setLinkType( String linkerType ) { 18 | this.linkerType = linkerType; 19 | } 20 | public WhereElement getWhereElement() { 21 | return whereElement; 22 | } 23 | public void setWhereElement( WhereElement whereElement ) { 24 | this.whereElement = whereElement; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /client/org/ralasafe/userType/UserTypeManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.userType; 6 | 7 | import java.util.Collection; 8 | 9 | import org.ralasafe.EntityExistException; 10 | 11 | public interface UserTypeManager { 12 | 13 | public abstract Collection getAllUserTypes(); 14 | public abstract UserType getUserType(String name); 15 | public abstract UserType getUserTypeCopy(String name); 16 | public abstract void addUserType(UserType userType) throws EntityExistException; 17 | public abstract void deleteUserType(String name); 18 | public abstract void updateUserType(UserType userType); 19 | public abstract Collection getApplications(String userTypeName); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/ralasafe/ralasafe-db.properties: -------------------------------------------------------------------------------- 1 | jdbcDriver=com.mysql.jdbc.Driver 2 | jdbcUrl=jdbc:mysql://localhost/ralasafe?useUnicode=true 3 | jdbcUser=root 4 | jdbcPassword=1234 5 | 6 | connectionPoolMaxSize=5 7 | connectionPoolMaxIdle=2 8 | connectionPoolMaxWait=60000 9 | connectionPoolMinSize=0 10 | 11 | #MYSQL JDBC DRIVER & URL 12 | #jdbcDriver=com.mysql.jdbc.Driver 13 | #jdbcUrl=jdbc:mysql://localhost/mydemo?useUnicode=true 14 | 15 | #ORACLE JDBC DRIVER & URL 16 | #jdbcDriver=oracle.jdbc.driver.OracleDriver 17 | #jdbcUrl=jdbc:oracle:thin:@localhost:1521:yourdbname 18 | 19 | #DB2 JDBC DRIVER & URL 20 | #jdbcDriver=com.ibm.db2.jcc.DB2Driver 21 | #jdbcUrl=jdbc:db2://localhost:50000/sample 22 | 23 | #SQL SERVER DRIVER & URL 24 | #jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver 25 | #jdbcUrl=jdbc:sqlserver://localhost:1433;databaseName=yourdbname -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_cn.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: CN 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "必选字段", 7 | remote: "请修正该字段", 8 | email: "请输入正确格式的电子邮件", 9 | url: "请输入合法的网址", 10 | date: "请输入合法的日期", 11 | dateISO: "请输入合法的日期 (ISO).", 12 | number: "请输入合法的数字", 13 | digits: "只能输入整数", 14 | creditcard: "请输入合法的信用卡号", 15 | equalTo: "请再次输入相同的值", 16 | accept: "请输入拥有合法后缀名的字符串", 17 | maxlength: jQuery.validator.format("请输入一个长度最多是 {0} 的字符串"), 18 | minlength: jQuery.validator.format("请输入一个长度最少是 {0} 的字符串"), 19 | rangelength: jQuery.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"), 20 | range: jQuery.validator.format("请输入一个介于 {0} 和 {1} 之间的值"), 21 | max: jQuery.validator.format("请输入一个最大为 {0} 的值"), 22 | min: jQuery.validator.format("请输入一个最小为 {0} 的值") 23 | }); -------------------------------------------------------------------------------- /client/org/ralasafe/privilege/RolePrivilege.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.privilege; 6 | 7 | public class RolePrivilege { 8 | private int roleId; 9 | private int privilegeId; 10 | public int getRoleId() { 11 | return roleId; 12 | } 13 | public void setRoleId(int roleId) { 14 | this.roleId = roleId; 15 | } 16 | public int getPrivilegeId() { 17 | return privilegeId; 18 | } 19 | public void setPrivilegeId(int privilegeId) { 20 | this.privilegeId = privilegeId; 21 | } 22 | 23 | public RolePrivilege() {} 24 | 25 | public RolePrivilege(int roleId, int privilegeId) 26 | { 27 | this.roleId = roleId; 28 | this.privilegeId = privilegeId; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Ralasafe_zh.properties: -------------------------------------------------------------------------------- 1 | Designer: \u6743\u9650\u8bbe\u8ba1\u5668 2 | noPrivilege: \u60a8\u6ca1\u6709\u201c{0}\u201d\u7684\u6743\u9650\u3002 3 | noPrivilegeForQueryPolicy: \u60a8\u6ca1\u6709\u201c{0}\u201d\u7684\u6743\u9650\uff0c\u8fd4\u56de\u7a7a\u96c6\u5408\u3002 4 | noQueryPolicyMatched: \u6ca1\u6709\u5339\u914d\u7684\u6388\u6743\u7b56\u7565\uff0c\u8fd4\u56de\u7a7a\u96c6\u5408\u3002 5 | reservedUserCategoryName: \u89d2\u8272 6 | ralasafeAdmin: Ralasafe \u7ba1\u7406 7 | policyAdmin: \u7b56\u7565\u7ba1\u7406 8 | AssignRoleToUser: \u7ed9\u7528\u6237\u5206\u914d\u89d2\u8272 9 | RoleAdmin: \u89d2\u8272\u7ba1\u7406 10 | policyAdminDescription: \u5236\u5b9a\u6388\u6743\u7b56\u7565\u3001\u5b9a\u4e49\u7528\u6237\u5206\u7c7b\u3001\u4e1a\u52a1\u6570\u636e\u5206\u7c7b\u548c\u6570\u636e\u67e5\u8be2 11 | ralasafeAdministrator: Ralasafe \u7ba1\u7406\u5458 12 | error: \u9519\u8bef 13 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_tw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: TW (Taiwan - Traditional Chinese) 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "必填", 7 | remote: "請修正此欄位", 8 | email: "請輸入正確的電子信箱", 9 | url: "請輸入合法的URL", 10 | date: "請輸入合法的日期", 11 | dateISO: "請輸入合法的日期 (ISO).", 12 | number: "請輸入數字", 13 | digits: "請輸入整數", 14 | creditcard: "請輸入合法的信用卡號碼", 15 | equalTo: "請重複輸入一次", 16 | accept: "請輸入有效的後缀字串", 17 | maxlength: jQuery.validator.format("請輸入長度不大於{0} 的字串"), 18 | minlength: jQuery.validator.format("請輸入長度不小於 {0} 的字串"), 19 | rangelength: jQuery.validator.format("請輸入長度介於 {0} 和 {1} 之間的字串"), 20 | range: jQuery.validator.format("請輸入介於 {0} 和 {1} 之間的數值"), 21 | max: jQuery.validator.format("請輸入不大於 {0} 的數值"), 22 | min: jQuery.validator.format("請輸入不小於 {0} 的數值") 23 | }); -------------------------------------------------------------------------------- /orm/org/ralasafe/db/ComplexWhereElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * Complex where condition. 9 | * 10 | * @author jbwang 11 | * 12 | */ 13 | public class ComplexWhereElement implements WhereElement { 14 | private WhereElement firstPart; 15 | private LWhereElement[] linkedParts; 16 | 17 | public WhereElement getFirstPart() { 18 | return firstPart; 19 | } 20 | public void setFirstPart( WhereElement firstPart ) { 21 | this.firstPart = firstPart; 22 | } 23 | public LWhereElement[] getLinkedParts() { 24 | return linkedParts; 25 | } 26 | public void setLinkedParts( LWhereElement[] linkedParts ) { 27 | this.linkedParts = linkedParts; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/MapStorgeObject.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | public class MapStorgeObject { 11 | private Map storage = new HashMap(); 12 | 13 | public MapStorgeObject(Map map) { 14 | this.storage = map; 15 | } 16 | 17 | public MapStorgeObject() { 18 | } 19 | 20 | public Map getStorage() { 21 | return storage; 22 | } 23 | 24 | public void put(String key, Object value) { 25 | storage.put(key, value); 26 | } 27 | 28 | public Object get(String key) { 29 | return storage.get(key); 30 | } 31 | 32 | public boolean containsKey(String key) { 33 | return storage.containsKey(key); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /user/org/ralasafe/user/FieldWhereElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | 8 | public class FieldWhereElement implements WhereElement { 9 | private String name; 10 | private Comparator compartor; 11 | private Object value; 12 | 13 | public Comparator getCompartor() { 14 | return compartor; 15 | } 16 | public void setCompartor( Comparator compartor ) { 17 | this.compartor = compartor; 18 | } 19 | public Object getValue() { 20 | return value; 21 | } 22 | public void setValue( Object value ) { 23 | this.value = value; 24 | } 25 | public String getName() { 26 | return name; 27 | } 28 | public void setName( String name ) { 29 | this.name=name; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/SimpleOperator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | /** 8 | * Operation: =, !=, <=, <, >=, >, LIKE 9 | */ 10 | public class SimpleOperator extends Operator { 11 | public static final String EQUAL="="; 12 | public static final String NOT_EQUAL="!="; 13 | public static final String LESS_EQUAL="<="; 14 | public static final String LESS_THAN="<"; 15 | public static final String GREATER_EQUAL=">="; 16 | public static final String GREATER_THAN=">"; 17 | public static final String LIKE="LIKE"; 18 | 19 | public String toSQL() { 20 | StringBuffer buf=new StringBuffer(); 21 | buf.append( " " ).append( this.getValue() ).append( " " ); 22 | return buf.toString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_ja.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: JA (Japanese) 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "このフィールドは必須です。", 7 | remote: "このフィールドを修正してください。", 8 | email: "有効なEメールアドレスを入力してください。", 9 | url: "有効なURLを入力してください。", 10 | date: "有効な日付を入力してください。", 11 | dateISO: "有効な日付(ISO)を入力してください。", 12 | number: "有効な数字を入力してください。", 13 | digits: "数字のみを入力してください。", 14 | creditcard: "有効なクレジットカード番号を入力してください。", 15 | equalTo: "同じ値をもう一度入力してください。", 16 | accept: "有効な拡張子を含む値を入力してください。", 17 | maxlength: jQuery.format("{0} 文字以内で入力してください。"), 18 | minlength: jQuery.format("{0} 文字以上で入力してください。"), 19 | rangelength: jQuery.format("{0} 文字から {1} 文字までの値を入力してください。"), 20 | range: jQuery.format("{0} から {1} までの値を入力してください。"), 21 | max: jQuery.format("{0} 以下の値を入力してください。"), 22 | min: jQuery.format("{1} 以上の値を入力してください。") 23 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_sk.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: SK 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Povinné zadať.", 7 | maxlength: jQuery.validator.format("Maximálne {0} znakov."), 8 | minlength: jQuery.validator.format("Minimálne {0} znakov."), 9 | rangelength: jQuery.validator.format("Minimálne {0} a Maximálne {0} znakov."), 10 | email: "E-mailová adresa musí byť platná.", 11 | url: "URL musí byť platný.", 12 | date: "Musí byť dátum.", 13 | number: "Musí byť číslo.", 14 | digits: "Môže obsahovať iba číslice.", 15 | equalTo: "Dva hodnoty sa musia rovnať.", 16 | range: jQuery.validator.format("Musí byť medzi {0} a {1}."), 17 | max: jQuery.validator.format("Nemôže byť viac ako{0}."), 18 | min: jQuery.validator.format("Nemôže byť menej ako{0}."), 19 | creditcard: "Číslo platobnej karty musí byť platné." 20 | }); 21 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/ColumnAdapter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import java.sql.PreparedStatement; 8 | import java.sql.ResultSet; 9 | import java.sql.SQLException; 10 | 11 | /** 12 | * Adapter JavaBean and ResultSet/PreparedStatement 13 | * 14 | * @author back 15 | * 16 | */ 17 | public interface ColumnAdapter { 18 | public void setPreparedStatement(PreparedStatement pstmt, int paramIndex, 19 | Object o) throws SQLException; 20 | 21 | public void readResultSet(ResultSet rs, int columnIndex, Object o) 22 | throws SQLException; 23 | 24 | public void readResultSet(ResultSet rs, String columnName, Object o) 25 | throws SQLException; 26 | 27 | public Object extractFieldValue(Object o); 28 | } 29 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/entitle/Backup.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.entitle; 6 | 7 | import java.util.Date; 8 | 9 | public class Backup { 10 | private int id; 11 | private Date createTime; 12 | private String description; 13 | 14 | public int getId() { 15 | return id; 16 | } 17 | 18 | public void setId(int id) { 19 | this.id = id; 20 | } 21 | 22 | public Date getCreateTime() { 23 | return createTime; 24 | } 25 | 26 | public void setCreateTime(Date createTime) { 27 | this.createTime = createTime; 28 | } 29 | 30 | public String getDescription() { 31 | return description; 32 | } 33 | 34 | public void setDescription(String description) { 35 | this.description = description; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/xml/types/.castor.cdr: -------------------------------------------------------------------------------- 1 | #Fri Aug 21 22:38:20 CST 2009 2 | org.ralasafe.db.sql.xml.types.FormulaTypeOperatorType=org.ralasafe.db.sql.xml.types.descriptors.FormulaTypeOperatorTypeDescriptor 3 | org.ralasafe.db.sql.xml.types.FormulaTypeTypeType=org.ralasafe.db.sql.xml.types.descriptors.FormulaTypeTypeTypeDescriptor 4 | org.ralasafe.db.sql.xml.types.QueryTypeTypeType=org.ralasafe.db.sql.xml.types.descriptors.QueryTypeTypeTypeDescriptor 5 | org.ralasafe.db.sql.xml.types.SimpleOperatorType=org.ralasafe.db.sql.xml.types.descriptors.SimpleOperatorTypeDescriptor 6 | org.ralasafe.db.sql.xml.types.SimpleValueTypeTypeType=org.ralasafe.db.sql.xml.types.descriptors.SimpleValueTypeTypeTypeDescriptor 7 | org.ralasafe.db.sql.xml.types.LinkerType=org.ralasafe.db.sql.xml.types.descriptors.LinkerTypeDescriptor 8 | org.ralasafe.db.sql.xml.types.ColumnTypeOrderType=org.ralasafe.db.sql.xml.types.descriptors.ColumnTypeOrderTypeDescriptor 9 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/syntaxhighlighter/shBrushPlain.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/SyntaxHighlighter 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html 7 | * 8 | * @version 9 | * 3.0.83 (July 02 2010) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2010 Alex Gorbatchev. 13 | * 14 | * @license 15 | * Dual licensed under the MIT and GPL licenses. 16 | */ 17 | ;(function() 18 | { 19 | // CommonJS 20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; 21 | 22 | function Brush() 23 | { 24 | }; 25 | 26 | Brush.prototype = new SyntaxHighlighter.Highlighter(); 27 | Brush.aliases = ['text', 'plain']; 28 | 29 | SyntaxHighlighter.brushes.Plain = Brush; 30 | 31 | // CommonJS 32 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 33 | })(); 34 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_vi.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: VI (Vietnamese) 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Hãy nhập.", 7 | remote: "Hãy sửa cho đúng.", 8 | email: "Hãy nhập email.", 9 | url: "Hãy nhập URL.", 10 | date: "Hãy nhập ngày.", 11 | dateISO: "Hãy nhập ngày (ISO).", 12 | number: "Hãy nhập số.", 13 | digits: "Hãy nhập chữ số.", 14 | creditcard: "Hãy nhập số thẻ tín dụng.", 15 | equalTo: "Hãy nhập thêm lần nữa.", 16 | accept: "Phần mở rộng không đúng.", 17 | maxlength: jQuery.format("Hãy nhập từ {0} kí tự trở xuống."), 18 | minlength: jQuery.format("Hãy nhập từ {0} kí tự trở lên."), 19 | rangelength: jQuery.format("Hãy nhập từ {0} đến {1} kí tự."), 20 | range: jQuery.format("Hãy nhập từ {0} đến {1}."), 21 | max: jQuery.format("Hãy nhập từ {0} trở xuống."), 22 | min: jQuery.format("Hãy nhập từ {1} trở lên.") 23 | }); -------------------------------------------------------------------------------- /orm/org/ralasafe/db/LWhereElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * WARN!!!! 9 | * We will deprecate it later. 10 | */ 11 | public class LWhereElement { 12 | public static final String AND_LINK_TYPE="AND"; 13 | public static final String OR_LINK_TYPE="OR"; 14 | 15 | 16 | private String linkerType; 17 | private WhereElement whereElement; 18 | 19 | public String getLinkType() { 20 | return linkerType; 21 | } 22 | public void setLinkType( String linkerType ) { 23 | this.linkerType = linkerType; 24 | } 25 | public WhereElement getWhereElement() { 26 | return whereElement; 27 | } 28 | public void setWhereElement( WhereElement whereElement ) { 29 | this.whereElement = whereElement; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /demo/org/ralasafe/demo/Company.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.demo; 6 | 7 | public class Company { 8 | private int id; 9 | private String name; 10 | private int parentId; 11 | private int level; 12 | 13 | public int getLevel() { 14 | return level; 15 | } 16 | public void setLevel(int level) { 17 | this.level = level; 18 | } 19 | public int getParentId() { 20 | return parentId; 21 | } 22 | public void setParentId( int parentId ) { 23 | this.parentId=parentId; 24 | } 25 | public int getId() { 26 | return id; 27 | } 28 | public void setId( int id ) { 29 | this.id=id; 30 | } 31 | public String getName() { 32 | return name; 33 | } 34 | public void setName( String name ) { 35 | this.name=name; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_da.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: DA 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Dette felt er påkrævet.", 7 | maxlength: jQuery.validator.format("Indtast højst {0} tegn."), 8 | minlength: jQuery.validator.format("Indtast mindst {0} tegn."), 9 | rangelength: jQuery.validator.format("Indtast mindst {0} og højst {1} tegn."), 10 | email: "Indtast en gyldig email-adresse.", 11 | url: "Indtast en gyldig URL.", 12 | date: "Indtast en gyldig dato.", 13 | number: "Indtast et tal.", 14 | digits: "Indtast kun cifre.", 15 | equalTo: "Indtast den samme værdi igen.", 16 | range: jQuery.validator.format("Angiv en værdi mellem {0} og {1}."), 17 | max: jQuery.validator.format("Angiv en værdi der højst er {0}."), 18 | min: jQuery.validator.format("Angiv en værdi der mindst er {0}."), 19 | creditcard: "Indtast et gyldigt kreditkortnummer." 20 | }); 21 | -------------------------------------------------------------------------------- /demo/org/ralasafe/demo/LoanMoney.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.demo; 6 | 7 | import java.util.Date; 8 | 9 | public class LoanMoney { 10 | private int id; 11 | private int userId; 12 | private int money; 13 | private Date loanDate; 14 | public int getId() { 15 | return id; 16 | } 17 | public void setId( int id ) { 18 | this.id=id; 19 | } 20 | public int getUserId() { 21 | return userId; 22 | } 23 | public void setUserId( int userId ) { 24 | this.userId=userId; 25 | } 26 | public int getMoney() { 27 | return money; 28 | } 29 | public void setMoney( int money ) { 30 | this.money=money; 31 | } 32 | public Date getLoanDate() { 33 | return loanDate; 34 | } 35 | public void setLoanDate( Date loanDate ) { 36 | this.loanDate=loanDate; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/UserValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | import org.ralasafe.SystemConstant; 8 | 9 | public class UserValue extends DefineVariable { 10 | private String key; 11 | 12 | public String getKey() { 13 | return key; 14 | } 15 | 16 | public void setKey( String key ) { 17 | this.key=key; 18 | } 19 | 20 | /** 21 | * Script likes: Object v = user.get("key"); 22 | */ 23 | public String toScript() { 24 | String v=getVariableName(); 25 | String user=SystemConstant.USER_KEY; 26 | StringBuffer buff=new StringBuffer(); 27 | buff.append( " Object " ).append( v ).append( " = " ).append( user ) 28 | .append( ".get(\"" ).append( key ).append( "\"); " ).append( 29 | "\n" ); 30 | return buff.toString(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/RawSQL.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.ArrayList; 8 | 9 | public class RawSQL { 10 | private ArrayList parameters = new ArrayList(); 11 | private String content = ""; 12 | private Select select = new Select(); 13 | 14 | public Select getSelect() { 15 | return select; 16 | } 17 | 18 | public void setSelect(Select select) { 19 | this.select = select; 20 | } 21 | 22 | public ArrayList getParameters() { 23 | return parameters; 24 | } 25 | 26 | public void setParameters(ArrayList parameters) { 27 | this.parameters = parameters; 28 | } 29 | 30 | public String getContent() { 31 | return content; 32 | } 33 | 34 | public void setContent(String content) { 35 | this.content = content; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/Where.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public class Where implements SQLElement { 8 | private ExpressionGroup expressionGroup=new ExpressionGroup(); 9 | 10 | public String toSQL() { 11 | if( expressionGroup.getExpressions().size()==0 ) { 12 | return ""; 13 | } 14 | StringBuffer buf=new StringBuffer(); 15 | buf.append( "\n" ).append( " WHERE " ).append( expressionGroup.toSQL() ).append( " " ); 16 | return buf.toString(); 17 | } 18 | 19 | public ExpressionGroup getExpressionGroup() { 20 | return expressionGroup; 21 | } 22 | 23 | public void setExpressionGroup( ExpressionGroup expressionGroup ) { 24 | this.expressionGroup=expressionGroup; 25 | } 26 | 27 | public Where lightCopy() { 28 | return new Where(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/TableDeletor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import java.sql.Connection; 8 | 9 | import org.ralasafe.EntityExistException; 10 | 11 | /** 12 | * Delete entity operations from database. 13 | */ 14 | public interface TableDeletor { 15 | /** 16 | * Table definition 17 | * @param mapping 18 | */ 19 | public void setTable( Table mapping ); 20 | 21 | /** 22 | * Delete this entity from database. If doesn't exist, throw no exceptions. 23 | * @param o 24 | * @throws EntityExistException 25 | */ 26 | public void deleteByIdColumns( Object o ); 27 | public void deleteByIdColumns( Connection conn, Object o ); 28 | 29 | public void delete( WhereElement emt, Object o ); 30 | public void delete( Connection conn, WhereElement emt, Object o ); 31 | } 32 | -------------------------------------------------------------------------------- /constants-and-commons/org/ralasafe/WebConstants.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe; 6 | 7 | public class WebConstants { 8 | public static final String CURR_APP = "currApp"; 9 | public static final String CURR_USER_TYPE = "currUserType"; 10 | public static final String USER_FIELDS = "userFields"; 11 | public static final String USER_FIELD_DISPLAY_NAMES = "userFieldDisplayNames"; 12 | public static final String SHOW_USER_FIELDS = "showUserFields"; 13 | public static final String USER_TAG_FIELD = "userTagField"; 14 | public static final String SHOW_USER_ROLE_PANEL = "showUserRolePanel"; 15 | public static final String SHOW_ROLE_ADMIN_PANEL = "showRoleAdminPanel"; 16 | public static final String SHOW_POLICY_ADMIN_PANELS = "showPolicyAdminPanels"; 17 | public static final int DEFAULT_SHOW_ENTITY_SIZE=10; 18 | } 19 | -------------------------------------------------------------------------------- /demo/org/ralasafe/demo/Privilege.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.demo; 6 | 7 | public class Privilege { 8 | //------------ business privilege constants ------------- 9 | 10 | 11 | public static final int ROLE_ADMIN=-6; 12 | 13 | 14 | public static final int ASSIGN_ROLE_TO_USER=-5; 15 | 16 | 17 | /** 18 | * Define policy, user category, business data and query. 19 | */ 20 | public static final int POLICY_ADMIN=-4; 21 | 22 | 23 | public static final int QUERY_EMPLOYEE=2; 24 | 25 | 26 | public static final int LOAN=4; 27 | 28 | 29 | public static final int QUERY_LOAN=5; 30 | 31 | 32 | //------------ non role privilege constants ------------- 33 | 34 | 35 | public static final int QUERY_COMPANY=6; 36 | } 37 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/ContextValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | import org.ralasafe.SystemConstant; 8 | 9 | public class ContextValue extends DefineVariable { 10 | private String key; 11 | 12 | public String getKey() { 13 | return key; 14 | } 15 | 16 | public void setKey( String key ) { 17 | this.key=key; 18 | } 19 | 20 | /** 21 | * Script likes: Object v = context.get("key"); 22 | */ 23 | public String toScript() { 24 | String v=getVariableName(); 25 | String context=SystemConstant.CONTEXT; 26 | StringBuffer buff=new StringBuffer(); 27 | buff.append( " Object " ).append( v ).append( " = " ).append( context ) 28 | .append( ".get(\"" ).append( key ).append( "\"); " ).append( 29 | "\n" ); 30 | return buff.toString(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/StoredProcedure.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.ArrayList; 8 | 9 | public class StoredProcedure { 10 | private ArrayList parameters = new ArrayList(); 11 | private String content = ""; 12 | private Select select = new Select(); 13 | 14 | public Select getSelect() { 15 | return select; 16 | } 17 | 18 | public void setSelect(Select select) { 19 | this.select = select; 20 | } 21 | 22 | public ArrayList getParameters() { 23 | return parameters; 24 | } 25 | 26 | public void setParameters(ArrayList parameters) { 27 | this.parameters = parameters; 28 | } 29 | 30 | public String getContent() { 31 | return content; 32 | } 33 | 34 | public void setContent(String content) { 35 | this.content = content; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/BusinessDataPolicyAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import org.ralasafe.entitle.BusinessData; 10 | import org.ralasafe.entitle.BusinessDataManager; 11 | 12 | public class BusinessDataPolicyAction extends AbstractPolicyAction { 13 | //private static final Log log=LogFactory.getLog( BusinessDataPolicyAction.class ); 14 | 15 | 16 | public boolean isRawScript( HttpServletRequest req ) { 17 | int id=WebUtil.getIntParameter( req, "id", 0 ); 18 | 19 | BusinessDataManager manager=WebUtil.getBusinessDataManager( req ); 20 | BusinessData uc=manager.getBusinessData( id ); 21 | 22 | org.ralasafe.script.BusinessData script=uc.getScriptBusinessData(); 23 | return script.isRawScript(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_hu.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: HU 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Kötelező megadni.", 7 | maxlength: jQuery.validator.format("Legfeljebb {0} karakter hosszú legyen."), 8 | minlength: jQuery.validator.format("Legalább {0} karakter hosszú legyen."), 9 | rangelength: jQuery.validator.format("Legalább {0} és legfeljebb {1} karakter hosszú legyen."), 10 | email: "Érvényes e-mail címnek kell lennie.", 11 | url: "Érvényes URL-nek kell lennie.", 12 | date: "Dátumnak kell lennie.", 13 | number: "Számnak kell lennie.", 14 | digits: "Csak számjegyek lehetnek.", 15 | equalTo: "Meg kell egyeznie a két értéknek.", 16 | range: jQuery.validator.format("{0} és {1} közé kell esnie."), 17 | max: jQuery.validator.format("Nem lehet nagyobb, mint {0}."), 18 | min: jQuery.validator.format("Nem lehet kisebb, mint {0}."), 19 | creditcard: "Érvényes hitelkártyaszámnak kell lennie." 20 | }); 21 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/UserCategoryPolicyAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import org.ralasafe.entitle.UserCategory; 10 | import org.ralasafe.entitle.UserCategoryManager; 11 | 12 | public class UserCategoryPolicyAction extends AbstractPolicyAction { 13 | //private static final Log log=LogFactory.getLog( UserCategoryPolicyServlet.class ); 14 | 15 | 16 | public boolean isRawScript( HttpServletRequest req ) { 17 | int id=WebUtil.getIntParameter( req, "id", 0 ); 18 | 19 | UserCategoryManager manager=WebUtil.getUserCategoryManager( req ); 20 | UserCategory uc=manager.getUserCategory( id ); 21 | 22 | org.ralasafe.script.UserCategory script=uc.getScriptUserCategory(); 23 | return script.isRawScript(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /client/org/ralasafe/privilege/Role.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.privilege; 6 | 7 | public class Role { 8 | 9 | private int id; 10 | 11 | private String name; 12 | 13 | private String description; 14 | 15 | public int getId() { 16 | return id; 17 | } 18 | 19 | public void setId(int id) { 20 | this.id = id; 21 | } 22 | 23 | public String getName() { 24 | return name; 25 | } 26 | 27 | public void setName(String name) { 28 | this.name = name; 29 | } 30 | 31 | public String getDescription() { 32 | return description; 33 | } 34 | 35 | public void setDescription(String description) { 36 | this.description = description; 37 | } 38 | 39 | public String toString() { 40 | return "Role(id=" + id + ",name=" + name 41 | + ",description="+description + ")"; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /demo/org/ralasafe/demo/LogoutServlet.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.demo; 6 | 7 | import java.io.IOException; 8 | 9 | import javax.servlet.ServletException; 10 | import javax.servlet.http.HttpServlet; 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | 14 | import org.ralasafe.WebRalasafe; 15 | 16 | public class LogoutServlet extends HttpServlet { 17 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) 18 | throws ServletException, IOException { 19 | 20 | WebRalasafe.setCurrentUser(req, null); 21 | 22 | String toUrl = "login.jsp"; 23 | resp.sendRedirect(toUrl); 24 | } 25 | 26 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) 27 | throws ServletException, IOException { 28 | doGet(req, resp); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demo/org/ralasafe/demo/DemoUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.demo; 6 | 7 | import java.sql.Connection; 8 | import java.text.MessageFormat; 9 | import java.util.Locale; 10 | import java.util.ResourceBundle; 11 | 12 | import org.ralasafe.db.DBPower; 13 | 14 | public class DemoUtil { 15 | 16 | public static Connection getConnection() { 17 | return DBPower.getConnection(DBPower.getDefaultAppDsName()); 18 | } 19 | 20 | // public static String getMessage(Locale locale, String key) { 21 | // return ResourceBundle.getBundle("demo", locale).getString(key); 22 | // } 23 | // 24 | // public static String getMessage(Locale locale, String key, String argument) { 25 | // ResourceBundle rb = ResourceBundle.getBundle("demo", locale); 26 | // return MessageFormat.format(rb.getString(key), 27 | // new Object[] { argument }); 28 | // } 29 | } 30 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/Column.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | public class Column { 8 | private String name; 9 | private Type type; 10 | private ColumnAdapter adapter; 11 | private String function; 12 | 13 | public ColumnAdapter getAdapter() { 14 | return adapter; 15 | } 16 | public void setAdapter( ColumnAdapter adapter ) { 17 | this.adapter = adapter; 18 | } 19 | public String getName() { 20 | return name; 21 | } 22 | public void setName( String name ) { 23 | this.name = name; 24 | } 25 | public Type getType() { 26 | return type; 27 | } 28 | public void setType( Type type ) { 29 | this.type = type; 30 | } 31 | public void setFunction( String function ) { 32 | this.function = function; 33 | 34 | } 35 | public String getFunction() { 36 | return this.function; 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /user/org/ralasafe/user/UserSelectCondition.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.user; 6 | 7 | 8 | /** 9 | * 10 | * @author back 11 | * 12 | */ 13 | public class UserSelectCondition { 14 | private WhereElement whereElement; 15 | private GroupPart groupPart; 16 | private OrderPart orderPart; 17 | 18 | public GroupPart getGroupPart() { 19 | return groupPart; 20 | } 21 | public OrderPart getOrderPart() { 22 | return orderPart; 23 | } 24 | public WhereElement getWhereElement() { 25 | return whereElement; 26 | } 27 | public void setGroupPart( GroupPart groupPart ) { 28 | this.groupPart = groupPart; 29 | } 30 | public void setOrderPart( OrderPart orderPart ) { 31 | this.orderPart = orderPart; 32 | } 33 | public void setWhereElement( WhereElement whereElement ) { 34 | this.whereElement = whereElement; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_he.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: HE 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: ".השדה הזה הינו שדה חובה", 7 | remote: "נא לתקן שדה זה.", 8 | email: "נא למלא כתובת דוא\"ל חוקית", 9 | url: "נא למלא כתובת אינטרנט חוקית.", 10 | date: "נא למלא תאריך חוקי", 11 | dateISO: "נא למלא תאריך חוקי (ISO).", 12 | number: "נא למלא מספר.", 13 | digits: ".נא למלא רק מספרים", 14 | creditcard: "נא למלא מספר כרטיס אשראי חוקי.", 15 | equalTo: "נא למלא את אותו ערך שוב.", 16 | accept: "נא למלא ערך עם סיומת חוקית.", 17 | maxlength: jQuery.validator.format(".נא לא למלא יותר מ- {0} תווים"), 18 | minlength: jQuery.validator.format("נא למלא לפחות {0} תווים."), 19 | rangelength: jQuery.validator.format("נא למלא ערך בין {0} ל- {1} תווים."), 20 | range: jQuery.validator.format("נא למלא ערך בין {0} ל- {1}."), 21 | max: jQuery.validator.format("נא למלא ערך קטן או שווה ל- {0}."), 22 | min: jQuery.validator.format("נא למלא ערך גדול או שווה ל- {0}.") 23 | }); 24 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/ValuesOfIn.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Iterator; 9 | 10 | public class ValuesOfIn implements RightOfIn { 11 | private ArrayList values=new ArrayList(); 12 | 13 | public String toSQL() { 14 | StringBuffer buf=new StringBuffer(); 15 | buf.append( " (" ); 16 | if( values.size()>0 ) { 17 | Iterator itr=values.iterator(); 18 | Value value=(Value) itr.next(); 19 | buf.append( value.toSQL() ); 20 | while( itr.hasNext() ) { 21 | value=(Value) itr.next(); 22 | buf.append( "," ).append( value.toSQL() ); 23 | } 24 | } 25 | buf.append( ") " ); 26 | return buf.toString(); 27 | } 28 | 29 | public ArrayList getValues() { 30 | return values; 31 | } 32 | 33 | public void setValues( ArrayList values ) { 34 | this.values=values; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/org/ralasafe/group/NodeManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.group; 6 | 7 | import java.util.Collection; 8 | 9 | public interface NodeManager { 10 | 11 | public abstract void addNode(Node node); 12 | public abstract void updateNode(Node node); 13 | public abstract void deleteNode(int nodeId); 14 | public abstract void deleteNodeCascade(int nodeId); 15 | public abstract Node getNode(int nodeId); 16 | public abstract Node getParentNode(Node node); 17 | public abstract Collection getChildrenNodes(Node pnode); 18 | public abstract boolean isChild(int pnodeId, int nodeId); 19 | public abstract boolean isCascadeChild(int pnodeId, int nodeId); 20 | public abstract void moveNode(Node node, Node targetNode); 21 | public abstract void moveNode(Collection nodes, Node targetNode); 22 | public abstract Node getRoot(); 23 | public abstract Node getTree(int nodeId); 24 | } -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/ColumnsOfIn.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.Collection; 8 | import java.util.Iterator; 9 | 10 | public class ColumnsOfIn implements LeftOfIn { 11 | private Collection columns; 12 | 13 | public String toSQL() { 14 | StringBuffer buf=new StringBuffer(); 15 | buf.append( " (" ); 16 | if( columns.size()>0 ) { 17 | Iterator itr=columns.iterator(); 18 | Column column=(Column) itr.next(); 19 | buf.append( column.toSQL() ); 20 | while( itr.hasNext() ) { 21 | column=(Column) itr.next(); 22 | buf.append( "," ).append( column.toSQL() ); 23 | } 24 | } 25 | buf.append( ") " ); 26 | return buf.toString(); 27 | } 28 | 29 | public Collection getColumns() { 30 | return columns; 31 | } 32 | 33 | public void setColumns( Collection columns ) { 34 | this.columns=columns; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/TableUpdator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import java.sql.Connection; 8 | 9 | import org.ralasafe.EntityExistException; 10 | 11 | /** 12 | * Update entity operations to database. 13 | * 14 | * @author back 15 | * 16 | */ 17 | public interface TableUpdator { 18 | /** 19 | * Table definition. 20 | * 21 | * @param mapping 22 | */ 23 | public void setTable( Table mapping ); 24 | 25 | /** 26 | * Update an entity. 27 | * If it doesn't exist, throw no exception; 28 | * If update operation would violate some constraints, throw EntityExistException 29 | * 30 | * @param newValue 31 | * @throws EntityExistException 32 | */ 33 | public void updateByIdColumns( Object newValue ) throws EntityExistException; 34 | 35 | public void updateByIdColumns( Connection conn, Object newValue ) throws EntityExistException; 36 | } 37 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/From.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Collection; 9 | import java.util.Iterator; 10 | 11 | public class From implements SQLElement { 12 | private Collection tables=new ArrayList(); 13 | 14 | public String toSQL() { 15 | StringBuffer buf=new StringBuffer(); 16 | buf.append( "\n" ).append( " FROM " ); 17 | if( tables.size()>0 ) { 18 | Iterator itr=tables.iterator(); 19 | Table table=(Table) itr.next(); 20 | buf.append( table.toSQL() ); 21 | while( itr.hasNext() ) { 22 | table=(Table) itr.next(); 23 | buf.append( "," ).append( table.toSQL() ); 24 | } 25 | } 26 | return buf.toString(); 27 | } 28 | 29 | public Collection getTables() { 30 | return tables; 31 | } 32 | 33 | public void setTables( Collection tables ) { 34 | this.tables=tables; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /WebContent/ralasafe/privilege/editRole.jsp: -------------------------------------------------------------------------------- 1 | <% 2 | /** 3 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 4 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | %> 7 | 8 | <%@ page language="java" contentType="text/html; charset=UTF-8" 9 | pageEncoding="UTF-8"%> 10 | <%@page import="org.ralasafe.privilege.Role"%> 11 | <% 12 | Role role=(Role) request.getAttribute( "role" ); 13 | org.ralasafe.util.I18N i18n=org.ralasafe.util.I18N.getWebInstance( request ); 14 | %> 15 | 16 | "/> 17 | " /> 18 | 19 | 20 | " /> 21 | 22 | " /> 23 | 24 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/TableSaver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import java.sql.Connection; 8 | import java.util.Collection; 9 | 10 | import org.ralasafe.EntityExistException; 11 | 12 | /** 13 | * Save entity operation to database. 14 | */ 15 | public interface TableSaver { 16 | /** 17 | * Table definition. 18 | * @param mapping 19 | */ 20 | public void setTable( Table mapping ); 21 | public void save( Object o ) throws EntityExistException, DBLevelException; 22 | public int[] batchSave( Object[] os ) throws DBLevelException; 23 | public Collection batchSave( Collection coll ) throws DBLevelException; 24 | 25 | public void save( Connection conn, Object o ) throws EntityExistException, DBLevelException; 26 | public int[] batchSave( Connection conn, Object[] os ) throws DBLevelException; 27 | public Collection batchSave( Connection conn, Collection coll ) throws DBLevelException; 28 | } 29 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/entitle/Decision.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.entitle; 6 | 7 | /** 8 | * Result of decision policy. 9 | * If request is denied, denyReason should be given. 10 | * 11 | */ 12 | public class Decision { 13 | protected static final String DEFAULT_DENY_REASON = "You are not granted to execute it"; 14 | private boolean permit; 15 | private String denyReason; 16 | 17 | /** 18 | * permit or deny 19 | * 20 | * @return true--permit; false--deny 21 | */ 22 | public boolean isPermit() { 23 | return permit; 24 | } 25 | 26 | public void setPermit(boolean permit) { 27 | this.permit = permit; 28 | } 29 | 30 | /** 31 | * deny reason 32 | * 33 | * @return 34 | */ 35 | public String getDenyReason() { 36 | return denyReason; 37 | } 38 | 39 | public void setDenyReason(String denyReason) { 40 | this.denyReason = denyReason; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/ComplexTableSelector.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import java.util.Collection; 8 | 9 | public interface ComplexTableSelector { 10 | public void setComplexTable( ComplexTable complexTable ); 11 | public void setSingleValueAdapters( SingleValueTableAdapter[] adapters ); 12 | public void setMultiValueAdapters( MultiValueTableAdapter[] adapters ); 13 | public Object selectByIdColumns( Object o ) throws DBLevelException; 14 | public Object selectByUniqueColumns( Object o ) throws DBLevelException; 15 | public Collection select( SelectCondition cdtn, Object hint ) throws DBLevelException; 16 | public Collection selectByPage( SelectCondition cdtn, 17 | Object hint, 18 | int startIndex, int pageSize ) throws DBLevelException; 19 | 20 | public int selectCount() throws DBLevelException; 21 | public int selectCount( SelectCondition cdtn, Object hint ) throws DBLevelException; 22 | } 23 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/GroupBy.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Iterator; 9 | 10 | public class GroupBy implements SQLElement { 11 | private ArrayList columns=new ArrayList(); 12 | 13 | public String toSQL() { 14 | if( columns.size()==0 ) { 15 | return ""; 16 | } 17 | StringBuffer buf=new StringBuffer(); 18 | buf.append( "\n" ).append( " GROUP BY " ); 19 | Iterator itr=columns.iterator(); 20 | Column column=(Column) itr.next(); 21 | buf.append( column.toSQL() ); 22 | while( itr.hasNext() ) { 23 | column=(Column) itr.next(); 24 | buf.append( "," ).append( column.toSQL() ); 25 | } 26 | buf.append( " " ); 27 | return buf.toString(); 28 | } 29 | 30 | public ArrayList getColumns() { 31 | return columns; 32 | } 33 | 34 | public void setColumns( ArrayList columns ) { 35 | this.columns=columns; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /util/org/ralasafe/util/I18N.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.util; 6 | 7 | import java.util.Locale; 8 | import java.util.ResourceBundle; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | 12 | public class I18N { 13 | private ResourceBundle rb; 14 | private static Locale locale; 15 | private I18N( ResourceBundle rb ) { 16 | this.rb=rb; 17 | } 18 | 19 | public static I18N getWebInstance( HttpServletRequest req ) { 20 | locale=req.getLocale(); 21 | ResourceBundle bundle=ResourceBundle.getBundle("Ralasafe_Web", locale); 22 | 23 | return new I18N( bundle ); 24 | } 25 | 26 | public String getValidateMessageFile() { 27 | String country=locale.getCountry(); 28 | if( country!=null ) { 29 | return "messages_"+country.toLowerCase()+".js"; 30 | } else { 31 | return ""; 32 | } 33 | } 34 | 35 | public String say( String msg ) { 36 | return rb.getString( msg ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_se.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: SE 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Detta fält är obligatoriskt.", 7 | maxlength: jQuery.validator.format("Du får ange högst {0} tecken."), 8 | minlength: jQuery.validator.format("Du måste ange minst {0} tecken."), 9 | rangelength: jQuery.validator.format("Ange minst {0} och max {1} tecken."), 10 | email: "Ange en korrekt e-postadress.", 11 | url: "Ange en korrekt URL.", 12 | date: "Ange ett korrekt datum.", 13 | dateISO: "Ange ett korrekt datum (&ARING;&ARING;&ARING;&ARING;-MM-DD).", 14 | number: "Ange ett korrekt nummer.", 15 | digits: "Ange endast siffror.", 16 | equalTo: "Ange samma värde igen.", 17 | range: jQuery.validator.format("Ange ett värde mellan {0} och {1}."), 18 | max: jQuery.validator.format("Ange ett värde som är större eller lika med {0}."), 19 | min: jQuery.validator.format("Ange ett värde som är mindre eller lika med {0}."), 20 | creditcard: "Ange ett korrekt kreditkortsnummer." 21 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_th.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: TH (Thai) 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "โปรดระบุ", 7 | remote: "โปรดแก้ไขให้ถูกต้อง", 8 | email: "โปรดระบุที่อยู่อีเมล์ที่ถูกต้อง", 9 | url: "โปรดระบุ URL ที่ถูกต้อง", 10 | date: "โปรดระบุวันที่ ที่ถูกต้อง", 11 | dateISO: "โปรดระบุวันที่ ที่ถูกต้อง (ระบบ ISO).", 12 | number: "โปรดระบุทศนิยมที่ถูกต้อง", 13 | digits: "โปรดระบุจำนวนเต็มที่ถูกต้อง", 14 | creditcard: "โปรดระบุรหัสบัตรเครดิตที่ถูกต้อง", 15 | equalTo: "โปรดระบุค่าเดิมอีกครั้ง", 16 | accept: "โปรดระบุค่าที่มีส่วนขยายที่ถูกต้อง", 17 | maxlength: jQuery.validator.format("โปรดอย่าระบุค่าที่ยาวกว่า {0} อักขระ"), 18 | minlength: jQuery.validator.format("โปรดอย่าระบุค่าที่สั้นกว่า {0} อักขระ"), 19 | rangelength: jQuery.validator.format("โปรดอย่าระบุค่าความยาวระหว่าง {0} ถึง {1} อักขระ"), 20 | range: jQuery.validator.format("โปรดระบุค่าระหว่าง {0} และ {1}"), 21 | max: jQuery.validator.format("โปรดระบุค่าน้อยกว่าหรือเท่ากับ {0}"), 22 | min: jQuery.validator.format("โปรดระบุค่ามากกว่าหรือเท่ากับ {0}") 23 | }); 24 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/query/-10_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | = 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | = 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 8 | 11 | 14 | 17 | 20 | 21 | 24 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_de.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: DE 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Dieses Feld ist ein Pflichtfeld.", 7 | maxlength: jQuery.validator.format("Geben Sie bitte maximal {0} Zeichen ein."), 8 | minlength: jQuery.validator.format("Geben Sie bitte mindestens {0} Zeichen ein."), 9 | rangelength: jQuery.validator.format("Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein."), 10 | email: "Geben Sie bitte eine gültige E-Mail Adresse ein.", 11 | url: "Geben Sie bitte eine gültige URL ein.", 12 | date: "Bitte geben Sie ein gültiges Datum ein.", 13 | number: "Geben Sie bitte eine Nummer ein.", 14 | digits: "Geben Sie bitte nur Ziffern ein.", 15 | equalTo: "Bitte denselben Wert wiederholen.", 16 | range: jQuery.validator.format("Geben Sie bitten einen Wert zwischen {0} und {1}."), 17 | max: jQuery.validator.format("Geben Sie bitte einen Wert kleiner oder gleich {0} ein."), 18 | min: jQuery.validator.format("Geben Sie bitte einen Wert größer oder gleich {0} ein."), 19 | creditcard: "Geben Sie bitte ein gültige Kreditkarten-Nummer ein." 20 | }); -------------------------------------------------------------------------------- /constants-and-commons/org/ralasafe/ResourceConstants.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe; 6 | 7 | public class ResourceConstants { 8 | public static final String DESIGNER = "Designer"; 9 | public static final String NO_PRIVILEGE = "noPrivilege"; 10 | public static final String NO_PRIVILEGE_FOR_QUERY_POLICY = "noPrivilegeForQueryPolicy"; 11 | public static final String NO_QUERY_POLICY_MATCHED = "noQueryPolicyMatched"; 12 | public static final String RESERVED_USER_CATEGORY_NAME = "reservedUserCategoryName"; 13 | public static final String RALASAFE_ADMIN = "ralasafeAdmin"; 14 | public static final String POLICY_ADMIN = "policyAdmin"; 15 | public static final String ASSIGN_ROLE_TO_USER = "AssignRoleToUser"; 16 | public static final String ROLE_ADMIN = "RoleAdmin"; 17 | public static final String POLICY_ADMIN_DESCRIPTION = "policyAdminDescription"; 18 | public static final String RALASAFE_ADMINISTRATOR = "ralasafeAdministrator"; 19 | public static final String ERROR = "error"; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/NonRolePrivilegeTreeHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Collection; 9 | import java.util.List; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | 13 | import org.ralasafe.group.Node; 14 | import org.ralasafe.privilege.Privilege; 15 | import org.ralasafe.privilege.PrivilegeManager; 16 | 17 | public class NonRolePrivilegeTreeHandler extends PrivilegeTreeHandler{ 18 | 19 | public NonRolePrivilegeTreeHandler(PrivilegeManager manager) { 20 | super(manager); 21 | } 22 | 23 | public Node getNode(HttpServletRequest req){ 24 | Privilege priv=(Privilege)super.getNode(req); 25 | priv.setType(1); 26 | return priv; 27 | } 28 | 29 | public Collection getAllNodes(){ 30 | Collection pvlgs=manager.getAllNonRolePrivileges(); 31 | List allPvlgs=new ArrayList(pvlgs.size()+1); 32 | allPvlgs.addAll( pvlgs ); 33 | return allPvlgs; 34 | } 35 | 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /client/org/ralasafe/privilege/RoleManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.privilege; 6 | 7 | import java.util.Collection; 8 | import java.util.Locale; 9 | 10 | import org.ralasafe.EntityExistException; 11 | 12 | public interface RoleManager { 13 | 14 | public abstract Role addRole(Role role) throws EntityExistException; 15 | 16 | public abstract void updateRole(Role role) throws EntityExistException; 17 | 18 | public abstract void deleteRole(int id); 19 | 20 | public abstract Role getRole(int id); 21 | 22 | public abstract Collection getLikelyRoles(String name); 23 | 24 | public abstract Collection getAllRoles(); 25 | 26 | public abstract void assignPrivileges(int roleId, Collection pvlgIds); 27 | 28 | public abstract Collection getPrivileges(int roleId); 29 | 30 | public abstract boolean hasPrivilege(int roleId, int pvlgId); 31 | 32 | public abstract void deleteRolePrivilegeByPrivilege(int pvlgId); 33 | 34 | public abstract void addReservedRole(Locale locale); 35 | } 36 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/businessData/3_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 20000 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | <= 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /xml(oracle)/ralasafe/businessData/3_ralasafe.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 20000 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | <= 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_cs.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: CS 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Tento údaj je povinný.", 7 | remote: "Prosím, opravte tento údaj.", 8 | email: "Prosím, zadejte platný e-mail.", 9 | url: "Prosím, zadejte platné URL.", 10 | date: "Prosím, zadejte platné datum.", 11 | dateISO: "Prosím, zadejte platné datum (ISO).", 12 | number: "Prosím, zadejte číslo.", 13 | digits: "Prosím, zadávejte pouze číslice.", 14 | creditcard: "Prosím, zadejte číslo kreditní karty.", 15 | equalTo: "Prosím, zadejte znovu stejnou hodnotu.", 16 | accept: "Prosím, zadejte soubor se správnou příponou.", 17 | maxlength: jQuery.validator.format("Prosím, zadejte nejvíce {0} znaků."), 18 | minlength: jQuery.validator.format("Prosím, zadejte nejméně {0} znaků."), 19 | rangelength: jQuery.validator.format("Prosím, zadejte od {0} do {1} znaků."), 20 | range: jQuery.validator.format("Prosím, zadejte hodnotu od {0} do {1}."), 21 | max: jQuery.validator.format("Prosím, zadejte hodnotu menší nebo rovnu {0}."), 22 | min: jQuery.validator.format("Prosím, zadejte hodnotu větší nebo rovnu {0}.") 23 | }); 24 | -------------------------------------------------------------------------------- /client/org/ralasafe/application/ApplicationUserType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.application; 6 | 7 | /** 8 | * An application may be used by many usertype. 9 | * Example: ERP would be used by employee, customer, supplier 10 | */ 11 | public class ApplicationUserType { 12 | 13 | private String appName; 14 | private String userTypeName; 15 | private String userMetadataStr; 16 | 17 | public ApplicationUserType() { 18 | } 19 | 20 | public String getAppName() { 21 | return appName; 22 | } 23 | 24 | public void setAppName( String appName ) { 25 | this.appName=appName; 26 | } 27 | 28 | public String getUserTypeName() { 29 | return userTypeName; 30 | } 31 | 32 | public void setUserTypeName( String userTypeName ) { 33 | this.userTypeName=userTypeName; 34 | } 35 | 36 | public String getUserMetadataStr() { 37 | return userMetadataStr; 38 | } 39 | 40 | public void setUserMetadataStr( String userMetadataStr ) { 41 | this.userMetadataStr=userMetadataStr; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /client/org/ralasafe/servlet/PrivilegeExportAction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.servlet; 6 | 7 | import java.io.IOException; 8 | import java.util.Collection; 9 | 10 | import javax.servlet.ServletException; 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | 14 | import org.ralasafe.privilege.PrivilegeManager; 15 | 16 | public class PrivilegeExportAction extends Action { 17 | 18 | protected void doGet( HttpServletRequest req, HttpServletResponse resp ) 19 | throws ServletException, IOException { 20 | PrivilegeManager pvlgMng=WebUtil.getPrivilegeManager( req ); 21 | 22 | Collection businessPrivileges=pvlgMng.getAllBusinessPrivileges(); 23 | Collection nonRolePrivileges=pvlgMng.getAllNonRolePrivileges(); 24 | 25 | req.setAttribute( "businessPrivileges", businessPrivileges ); 26 | req.setAttribute( "nonRolePrivileges", nonRolePrivileges ); 27 | 28 | WebUtil.forward( req, resp, "/ralasafe/privilege/constants.jsp" ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_no.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: NO (Norwegian) 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Dette feltet er obligatorisk.", 7 | maxlength: jQuery.validator.format("Maksimalt {0} tegn."), 8 | minlength: jQuery.validator.format("Minimum {0} tegn."), 9 | rangelength: jQuery.validator.format("Angi minimum {0} og maksimum {1} tegn."), 10 | email: "Oppgi en gyldig epostadresse.", 11 | url: "Angi en gyldig URL.", 12 | date: "Angi en gyldig dato.", 13 | dateISO: "Angi en gyldig dato (&ARING;&ARING;&ARING;&ARING;-MM-DD).", 14 | dateSE: "Angi en gyldig dato.", 15 | number: "Angi et gyldig nummer.", 16 | numberSE: "Angi et gyldig nummer.", 17 | digits: "Skriv kun tall.", 18 | equalTo: "Skriv samme verdi igjen.", 19 | range: jQuery.validator.format("Angi en verdi mellom {0} og {1}."), 20 | max: jQuery.validator.format("Angi en verdi som er større eller lik {0}."), 21 | min: jQuery.validator.format("Angi en verdi som er mindre eller lik {0}."), 22 | creditcard: "Angi et gyldig kredittkortnummer." 23 | }); -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/Table.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import org.ralasafe.util.StringUtil; 8 | 9 | public class Table implements SQLElement { 10 | private String schema; 11 | private String name; 12 | private String alias; 13 | 14 | public String toSQL() { 15 | StringBuffer buf = new StringBuffer(); 16 | 17 | buf.append(" "); 18 | if (!StringUtil.isEmpty(schema)) { 19 | buf.append(schema).append("."); 20 | } 21 | buf.append(name).append(" ").append(alias).append(" "); 22 | 23 | return buf.toString(); 24 | } 25 | 26 | public String getSchema() { 27 | return schema; 28 | } 29 | 30 | public void setSchema(String schema) { 31 | this.schema = schema; 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | 42 | public String getAlias() { 43 | return alias; 44 | } 45 | 46 | public void setAlias(String alias) { 47 | this.alias = alias; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/InExpression.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public class InExpression implements Expression { 8 | private LeftOfIn left; 9 | private RightOfIn right; 10 | 11 | public String toSQL() { 12 | StringBuffer buf=new StringBuffer(); 13 | buf.append( " " ); 14 | if( left instanceof Query ) { 15 | buf.append( "(" ).append( left.toSQL() ).append( ")" ); 16 | } else { 17 | buf.append( left.toSQL() ); 18 | } 19 | buf.append( " IN " ); 20 | if( right instanceof Query ) { 21 | buf.append( "(" ).append( right.toSQL() ).append( ")" ); 22 | } else { 23 | buf.append( right.toSQL() ); 24 | } 25 | buf.append( " " ); 26 | return buf.toString(); 27 | } 28 | 29 | public LeftOfIn getLeft() { 30 | return left; 31 | } 32 | 33 | public void setLeft( LeftOfIn left ) { 34 | this.left=left; 35 | } 36 | 37 | public RightOfIn getRight() { 38 | return right; 39 | } 40 | 41 | public void setRight( RightOfIn right ) { 42 | this.right=right; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/ralasafe/usermetadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
9 | <%=(first>0)?""+i18n.say( "First" )+"":i18n.say( "First" )%> 10 | 12 | <%=(first>0)?""+i18n.say( "Previous" )+"":i18n.say( "Previous" )%> 13 | 15 | <%=(first+size>=totalNumber)?i18n.say( "Next" ):""+i18n.say( "Next" )+""%> 16 | 18 | <%=(first+size>=totalNumber)?i18n.say( "End" ):""+i18n.say( "End" )+""%> 19 | <%=first+1 %>~<%=(first+size)>totalNumber?totalNumber:first+size %> of <%=totalNumber %> 22 | <%=i18n.say( "Page" )%>: <%=(first)/size+1 %>/<%=(totalNumber-1)/size+1 %> 23 |
5 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /client/org/ralasafe/privilege/UserRoleManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.privilege; 6 | 7 | import java.util.Collection; 8 | 9 | public interface UserRoleManager { 10 | 11 | public abstract void assignRoles(Object userId, Collection roleIds); 12 | public abstract void assignRoles(Collection userIds, Collection roleIds); 13 | 14 | /** 15 | * return Collection< Role > 16 | * @param userId 17 | * @return 18 | */ 19 | public abstract Collection getRoles(Object userId); 20 | 21 | /** 22 | * delete user's roles 23 | * @param userId 24 | */ 25 | public abstract void deleteUserRoles(Object userId); 26 | 27 | public abstract boolean hasPrivilege(Object userId, int pvlgId); 28 | 29 | /** 30 | * when delete a role, delete related user-role records 31 | * @param roleId 32 | */ 33 | public void deleteUserRoles(int roleId); 34 | 35 | /** 36 | * Get current user's menu 37 | * @param userId 38 | * @return 39 | */ 40 | public Privilege getBusinessPrivilegeTree(Object userId); 41 | } 42 | 43 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/NotInExpression.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | public class NotInExpression implements Expression { 8 | private LeftOfIn left; 9 | private RightOfIn right; 10 | 11 | public String toSQL() { 12 | StringBuffer buf=new StringBuffer(); 13 | buf.append( " " ); 14 | if( left instanceof Query ) { 15 | buf.append( "(" ).append( left.toSQL() ).append( ")" ); 16 | } else { 17 | buf.append( left.toSQL() ); 18 | } 19 | buf.append( " NOT IN " ); 20 | if( right instanceof Query ) { 21 | buf.append( "(" ).append( right.toSQL() ).append( ")" ); 22 | } else { 23 | buf.append( right.toSQL() ); 24 | } 25 | buf.append( " " ); 26 | return buf.toString(); 27 | } 28 | 29 | public LeftOfIn getLeft() { 30 | return left; 31 | } 32 | 33 | public void setLeft( LeftOfIn left ) { 34 | this.left=left; 35 | } 36 | 37 | public RightOfIn getRight() { 38 | return right; 39 | } 40 | 41 | public void setRight( RightOfIn right ) { 42 | this.right=right; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_bg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: BG 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Полето е задължително.", 7 | remote: "Моля, въведете правилната стойност.", 8 | email: "Моля, въведете валиден email.", 9 | url: "Моля, въведете валидно URL.", 10 | date: "Моля, въведете валидна дата.", 11 | dateISO: "Моля, въведете валидна дата (ISO).", 12 | number: "Моля, въведете валиден номер.", 13 | digits: "Моля, въведете само цифри", 14 | creditcard: "Моля, въведете валиден номер на кредитна карта.", 15 | equalTo: "Моля, въведете същата стойност отново.", 16 | accept: "Моля, въведете стойност с валидно разширение.", 17 | maxlength: $.validator.format("Моля, въведете повече от {0} символа."), 18 | minlength: $.validator.format("Моля, въведете поне {0} символа."), 19 | rangelength: $.validator.format("Моля, въведете стойност с дължина между {0} и {1} символа."), 20 | range: $.validator.format("Моля, въведете стойност между {0} и {1}."), 21 | max: $.validator.format("Моля, въведете стойност по-малка или равна на {0}."), 22 | min: $.validator.format("Моля, въведете стойност по-голяма или равна на {0}.") 23 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_fa.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: FA 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "تکمیل این فیلد اجباری است.", 7 | remote: "لطفا این فیلد را تصحیح کنید.", 8 | email: ".لطفا یک ایمیل صحیح وارد کنید", 9 | url: "لطفا آدرس صحیح وارد کنید.", 10 | date: "لطفا یک تاریخ صحیح وارد کنید", 11 | dateISO: "لطفا تاریخ صحیح وارد کنید (ISO).", 12 | number: "لطفا عدد صحیح وارد کنید.", 13 | digits: "لطفا تنها رقم وارد کنید", 14 | creditcard: "لطفا کریدیت کارت صحیح وارد کنید.", 15 | equalTo: "لطفا مقدار برابری وارد کنید", 16 | accept: "لطفا مقداری وارد کنید که ", 17 | maxlength: jQuery.validator.format("لطفا بیشتر از {0} حرف وارد نکنید."), 18 | minlength: jQuery.validator.format("لطفا کمتر از {0} حرف وارد نکنید."), 19 | rangelength: jQuery.validator.format("لطفا مقداری بین {0} تا {1} حرف وارد کنید."), 20 | range: jQuery.validator.format("لطفا مقداری بین {0} تا {1} حرف وارد کنید."), 21 | max: jQuery.validator.format("لطفا مقداری کمتر از {0} حرف وارد کنید."), 22 | min: jQuery.validator.format("لطفا مقداری بیشتر از {0} حرف وارد کنید.") 23 | }); 24 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_si.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: SI (Slovenian) 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "To polje je obvezno.", 7 | remote: "Vpis v tem polju ni v pravi obliki.", 8 | email: "Prosimo, vnesite pravi email naslov.", 9 | url: "Prosimo, vnesite pravi URL.", 10 | date: "Prosimo, vnesite pravi datum.", 11 | dateISO: "Prosimo, vnesite pravi datum (ISO).", 12 | number: "Prosimo, vnesite pravo številko.", 13 | digits: "Prosimo, vnesite samo številke.", 14 | creditcard: "Prosimo, vnesite pravo številko kreditne kartice.", 15 | equalTo: "Prosimo, ponovno vnesite enako vsebino.", 16 | accept: "Prosimo, vnesite vsebino z pravo končnico.", 17 | maxlength: $.validator.format("Prosimo, da ne vnašate več kot {0} znakov."), 18 | minlength: $.validator.format("Prosimo, vnesite vsaj {0} znakov."), 19 | rangelength: $.validator.format("Prosimo, vnesite od {0} do {1} znakov."), 20 | range: $.validator.format("Prosimo, vnesite vrednost med {0} in {1}."), 21 | max: $.validator.format("Prosimo, vnesite vrednost manjšo ali enako {0}."), 22 | min: $.validator.format("Prosimo, vnesite vrednost večjo ali enako {0}.") 23 | }); 24 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/TableView.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Collection; 9 | 10 | public class TableView { 11 | private String schema; 12 | private String name; 13 | private Collection columnViews = new ArrayList(); 14 | private Collection pkColumnViews = new ArrayList(); 15 | 16 | public String getSchema() { 17 | return schema; 18 | } 19 | 20 | public void setSchema(String schema) { 21 | this.schema = schema; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public void setName(String name) { 29 | this.name = name; 30 | } 31 | 32 | public Collection getColumnViews() { 33 | return columnViews; 34 | } 35 | 36 | public void setColumnViews(Collection columnViews) { 37 | this.columnViews = columnViews; 38 | } 39 | 40 | public Collection getPkColumnViews() { 41 | return pkColumnViews; 42 | } 43 | 44 | public void setPkColumnViews(Collection pkColumnViews) { 45 | this.pkColumnViews = pkColumnViews; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/OrderBy.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Iterator; 9 | 10 | public class OrderBy implements SQLElement { 11 | private ArrayList columns=new ArrayList(); 12 | 13 | public String toSQL() { 14 | if( columns.size()==0 ) { 15 | return ""; 16 | } 17 | 18 | StringBuffer buf=new StringBuffer(); 19 | buf.append( "\n" ).append( " ORDER BY " ); 20 | Iterator itr=columns.iterator(); 21 | Column column=(Column) itr.next(); 22 | buf.append( column.toSQL() ).append( " " ).append( column.getOrder() ) 23 | .append( " " ); 24 | while( itr.hasNext() ) { 25 | column=(Column) itr.next(); 26 | buf.append( "," ).append( column.toSQL() ).append( " " ).append( 27 | column.getOrder() ).append( " " ); 28 | } 29 | buf.append( " " ); 30 | return buf.toString(); 31 | } 32 | 33 | public ArrayList getColumns() { 34 | return columns; 35 | } 36 | 37 | public void setColumns( ArrayList columns ) { 38 | this.columns=columns; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /xml(mysql)/ralasafe/userType/20110620-093436-usermetadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 |
23 |
24 | 25 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_ar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin into arabic. 3 | * Locale: AR 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "هذا الحقل إلزامي", 7 | remote: "يرجى تصحيح هذا الحقل للمتابعة", 8 | email: "رجاء إدخال عنوان بريد إلكتروني صحيح", 9 | url: "رجاء إدخال عنوان موقع إلكتروني صحيح", 10 | date: "رجاء إدخال تاريخ صحيح", 11 | dateISO: "رجاء إدخال تاريخ صحيح (ISO)", 12 | number: "رجاء إدخال عدد بطريقة صحيحة", 13 | digits: "رجاء إدخال أرقام فقط", 14 | creditcard: "رجاء إدخال رقم بطاقة ائتمان صحيح", 15 | equalTo: "رجاء إدخال نفس القيمة", 16 | accept: "رجاء إدخال ملف بامتداد موافق عليه", 17 | maxlength: jQuery.validator.format("الحد الأقصى لعدد الحروف هو {0}"), 18 | minlength: jQuery.validator.format("الحد الأدنى لعدد الحروف هو {0}"), 19 | rangelength: jQuery.validator.format("عدد الحروف يجب أن يكون بين {0} و {1}"), 20 | range: jQuery.validator.format("رجاء إدخال عدد قيمته بين {0} و {1}"), 21 | max: jQuery.validator.format("رجاء إدخال عدد أقل من أو يساوي (0}"), 22 | min: jQuery.validator.format("رجاء إدخال عدد أكبر من أو يساوي (0}") 23 | }); 24 | 25 | -------------------------------------------------------------------------------- /WebContent/ralasafe/demo/noPrivilege.jsp: -------------------------------------------------------------------------------- 1 | <% 2 | /** 3 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 4 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | %> 7 | <%@ page language="java" contentType="text/html; charset=utf-8" 8 | pageEncoding="utf-8"%> 9 | <%@page import="java.util.Collection,java.util.Iterator"%> 10 | 11 | 12 | <%@page import="org.ralasafe.demo.DemoUtil"%> 13 | <%@page import="java.util.Locale"%> 14 | 15 | <% 16 | Locale locale = request.getLocale(); 17 | %> 18 | 19 | 20 | 21 | Access denied 22 | 23 | 24 | 25 | 26 | 27 |

Access denied

28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/NotInExpr.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public class NotInExpr implements Expr { 8 | private Variable variable1; 9 | private Variable variable2; 10 | 11 | /** 12 | * Script likes: !((java.util.Collection)v2).contains( v1 ) 13 | */ 14 | public String toScript() { 15 | StringBuffer buff = new StringBuffer(); 16 | String v1 = variable1.toScript(); 17 | String v2 = variable2.toScript(); 18 | buff.append(" !((java.util.Collection)").append(v2).append( 19 | ").contains(").append(v1).append(") "); 20 | return buff.toString(); 21 | } 22 | 23 | public Variable getVariable1() { 24 | return variable1; 25 | } 26 | 27 | public void setVariable1(Variable variable1) { 28 | this.variable1 = variable1; 29 | } 30 | 31 | public Variable getVariable2() { 32 | return variable2; 33 | } 34 | 35 | public void setVariable2(Variable variable2) { 36 | this.variable2 = variable2; 37 | } 38 | 39 | public boolean isUsed(String variableName) { 40 | return variable2.getName().equals(variableName); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/InExpr.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public class InExpr implements Expr { 8 | private Variable variable1; 9 | private Variable variable2; 10 | 11 | /** 12 | * Script likes: ((java.util.Collection)v2).contains( v1 ) 13 | * 14 | */ 15 | public String toScript() { 16 | StringBuffer buff=new StringBuffer(); 17 | String v1=variable1.toScript(); 18 | String v2=variable2.toScript(); 19 | buff.append( " ((java.util.Collection)" ).append( v2 ).append( 20 | ").contains(" ).append( v1 ).append( ") " ); 21 | return buff.toString(); 22 | } 23 | 24 | public Variable getVariable1() { 25 | return variable1; 26 | } 27 | 28 | public void setVariable1( Variable variable1 ) { 29 | this.variable1=variable1; 30 | } 31 | 32 | public Variable getVariable2() { 33 | return variable2; 34 | } 35 | 36 | public void setVariable2( Variable variable2 ) { 37 | this.variable2=variable2; 38 | } 39 | 40 | public boolean isUsed(String variableName) { 41 | return variable2.getName().equals(variableName); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_lt.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin in lithuanian. 3 | * Locale: LT 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Šis laukas yra privalomas.", 7 | remote: "Prašau pataisyti šį lauką.", 8 | email: "Prašau įvesti teisingą elektroninio pašto adresą.", 9 | url: "Prašau įvesti teisingą URL.", 10 | date: "Prašau įvesti teisingą datą.", 11 | dateISO: "Prašau įvesti teisingą datą (ISO).", 12 | number: "Prašau įvesti teisingą skaičių.", 13 | digits: "Prašau naudoti tik skaitmenis.", 14 | creditcard: "Prašau įvesti teisingą kreditinės kortelės numerį.", 15 | equalTo: "Prašau įvestį tą pačią reikšmę dar kartą.", 16 | accept: "Prašau įvesti reikšmę su teisingu plėtiniu.", 17 | maxlength: $.format("Prašau įvesti ne daugiau kaip {0} simbolių."), 18 | minlength: $.format("Prašau įvesti bent {0} simbolius."), 19 | rangelength: $.format("Prašau įvesti reikšmes, kurių ilgis nuo {0} iki {1} simbolių."), 20 | range: $.format("Prašau įvesti reikšmę intervale nuo {0} iki {1}."), 21 | max: $.format("Prašau įvesti reikšmę mažesnę arba lygią {0}."), 22 | min: $.format("Prašau įvesti reikšmę didesnę arba lygią {0}.") 23 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_it.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: IT 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Campo obbligatorio.", 7 | remote: "Controlla questo campo.", 8 | email: "Inserisci un indirizzo email valido.", 9 | url: "Inserisci un indirizzo web valido.", 10 | date: "Inserisci una data valida.", 11 | dateISO: "Inserisci una data valida (ISO).", 12 | number: "Inserisci un numero valido.", 13 | digits: "Inserisci solo numeri.", 14 | creditcard: "Inserisci un numero di carta di credito valido.", 15 | equalTo: "Il valore non corrisponde.", 16 | accept: "Inserisci un valore con un'estensione valida.", 17 | maxlength: jQuery.validator.format("Non inserire più di {0} caratteri."), 18 | minlength: jQuery.validator.format("Inserisci almeno {0} caratteri."), 19 | rangelength: jQuery.validator.format("Inserisci un valore compreso tra {0} e {1} caratteri."), 20 | range: jQuery.validator.format("Inserisci un valore compreso tra {0} e {1}."), 21 | max: jQuery.validator.format("Inserisci un valore minore o uguale a {0}."), 22 | min: jQuery.validator.format("Inserisci un valore maggiore o uguale a {0}.") 23 | }); -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/UserValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.Map; 8 | 9 | import org.apache.commons.logging.Log; 10 | import org.apache.commons.logging.LogFactory; 11 | import org.ralasafe.RalasafeException; 12 | import org.ralasafe.user.User; 13 | 14 | public class UserValue implements Value { 15 | private static Log log=LogFactory.getLog( UserValue.class ); 16 | private String key; 17 | private boolean behindLike; 18 | 19 | public boolean isBehindLike() { 20 | return behindLike; 21 | } 22 | 23 | public void setBehindLike(boolean behindLike) { 24 | this.behindLike = behindLike; 25 | } 26 | 27 | public String toSQL() { 28 | return " ? "; 29 | } 30 | 31 | public String getKey() { 32 | return key; 33 | } 34 | 35 | public void setKey(String key) { 36 | this.key = key; 37 | } 38 | 39 | public Object getValue(User user, Map context) { 40 | if (!user.containsField(key)) { 41 | String msg="No '" + key + "' found in user."; 42 | log.error( msg ); 43 | throw new RalasafeException(msg); 44 | } 45 | return user.get(key); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_pl.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: PL 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "To pole jest wymagane.", 7 | remote: "Proszę o wypełnienie tego pola.", 8 | email: "Proszę o podanie prawidłowego adresu email.", 9 | url: "Proszę o podanie prawidłowego URL.", 10 | date: "Proszę o podanie prawidłowej daty.", 11 | dateISO: "Proszę o podanie prawidłowej daty (ISO).", 12 | number: "Proszę o podanie prawidłowej liczby.", 13 | digits: "Proszę o podanie samych cyfr.", 14 | creditcard: "Proszę o podanie prawidłowej karty kredytowej.", 15 | equalTo: "Proszę o podanie tej samej wartości ponownie.", 16 | accept: "Proszę o podanie wartości z prawidłowym rozszerzeniem.", 17 | maxlength: jQuery.validator.format("Proszę o podanie nie więcej niż {0} znaków."), 18 | minlength: jQuery.validator.format("Proszę o podanie przynajmniej {0} znaków."), 19 | rangelength: jQuery.validator.format("Proszę o podanie wartości o długości od {0} do {1} znaków."), 20 | range: jQuery.validator.format("Proszę o podanie wartości z przedziału od {0} do {1}."), 21 | max: jQuery.validator.format("Proszę o podanie wartości mniejszej bądź równej {0}."), 22 | min: jQuery.validator.format("Proszę o podanie wartości większej bądź równej {0}.") 23 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_el.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: EL 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Αυτό το πεδίο είναι υποχρεωτικό.", 7 | remote: "Παρακαλώ διορθώστε αυτό το πεδίο.", 8 | email: "Παρακαλώ εισάγετε μια έγκυρη διεύθυνση email.", 9 | url: "Παρακαλώ εισάγετε ένα έγκυρο URL.", 10 | date: "Παρακαλώ εισάγετε μια έγκυρη ημερομηνία.", 11 | dateISO: "Παρακαλώ εισάγετε μια έγκυρη ημερομηνία (ISO).", 12 | number: "Παρακαλώ εισάγετε έναν έγκυρο αριθμό.", 13 | digits: "Παρακαλώ εισάγετε μόνο αριθμητικά ψηφία.", 14 | creditcard: "Παρακαλώ εισάγετε έναν έγκυρο αριθμό πιστωτικής κάρτας.", 15 | equalTo: "Παρακαλώ εισάγετε την ίδια τιμή ξανά.", 16 | accept: "Παρακαλώ εισάγετε μια τιμή με έγκυρη επέκταση αρχείου.", 17 | maxlength: $.validator.format("Παρακαλώ εισάγετε μέχρι και {0} χαρακτήρες."), 18 | minlength: $.validator.format("Παρακαλώ εισάγετε τουλάχιστον {0} χαρακτήρες."), 19 | rangelength: $.validator.format("Παρακαλώ εισάγετε μια τιμή με μήκος μεταξύ {0} και {1} χαρακτήρων."), 20 | range: $.validator.format("Παρακαλώ εισάγετε μια τιμή μεταξύ {0} και {1}."), 21 | max: $.validator.format("Παρακαλώ εισάγετε μια τιμή μικρότερη ή ίση του {0}."), 22 | min: $.validator.format("Παρακαλώ εισάγετε μια τιμή μεγαλύτερη ή ίση του {0}.") 23 | }); 24 | 25 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_es.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: ES 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Este campo es obligatorio.", 7 | remote: "Por favor, rellena este campo.", 8 | email: "Por favor, escribe una dirección de correo válida", 9 | url: "Por favor, escribe una URL válida.", 10 | date: "Por favor, escribe una fecha válida.", 11 | dateISO: "Por favor, escribe una fecha (ISO) válida.", 12 | number: "Por favor, escribe un número entero válido.", 13 | digits: "Por favor, escribe sólo dígitos.", 14 | creditcard: "Por favor, escribe un número de tarjeta válido.", 15 | equalTo: "Por favor, escribe el mismo valor de nuevo.", 16 | accept: "Por favor, escribe un valor con una extensión aceptada.", 17 | maxlength: jQuery.validator.format("Por favor, no escribas más de {0} caracteres."), 18 | minlength: jQuery.validator.format("Por favor, no escribas menos de {0} caracteres."), 19 | rangelength: jQuery.validator.format("Por favor, escribe un valor entre {0} y {1} caracteres."), 20 | range: jQuery.validator.format("Por favor, escribe un valor entre {0} y {1}."), 21 | max: jQuery.validator.format("Por favor, escribe un valor menor o igual a {0}."), 22 | min: jQuery.validator.format("Por favor, escribe un valor mayor o igual a {0}.") 23 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_fi.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: FI 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Tämä kenttä on pakollinen.", 7 | maxlength: jQuery.validator.format("Voit syöttää enintään {0} merkkiä."), 8 | minlength: jQuery.validator.format("Vähintään {0} merkkiä."), 9 | rangelength: jQuery.validator.format("Syötä vähintään {0} ja enintään {1} merkkiä."), 10 | email: "Syö:tä oikea sähköpostiosoite.", 11 | url: "Syötä oikea URL osoite.", 12 | date: "Syötä oike päivämäärä.", 13 | dateISO: "Syötä oike päivämäärä (VVVV-MM-DD).", 14 | number: "Syötä numero.", 15 | digits: "Syötä pelkästään numeroita.", 16 | equalTo: "Syötä sama arvo uudestaan.", 17 | range: jQuery.validator.format("Syötä arvo {0} ja {1} väliltä."), 18 | max: jQuery.validator.format("Syötä arvo joka on yhtä suuri tai suurempi kuin {0}."), 19 | min: jQuery.validator.format("Syötä arvo joka on pienempi tai yhtä suuri kuin {0}."), 20 | creditcard: "Syötä voimassa oleva luottokorttinumero." 21 | }); -------------------------------------------------------------------------------- /orm/org/ralasafe/db/FieldWhereElement.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db; 6 | 7 | /** 8 | * Field where condition. 9 | * 10 | * @author jbwang 11 | * 12 | */ 13 | public class FieldWhereElement implements WhereElement { 14 | private Column column; 15 | private Comparator compartor; 16 | /** If SingleValueComparator, the value is a string; 17 | * If it's a MultiValueComparator, the value is a collection of string */ 18 | private Object value; 19 | 20 | private boolean isContextValue; 21 | 22 | public Comparator getCompartor() { 23 | return compartor; 24 | } 25 | public void setCompartor( Comparator compartor ) { 26 | this.compartor = compartor; 27 | } 28 | public Object getValue() { 29 | return value; 30 | } 31 | public void setValue( Object value ) { 32 | this.value = value; 33 | } 34 | public Column getColumn() { 35 | return column; 36 | } 37 | public void setColumn( Column column ) { 38 | this.column = column; 39 | } 40 | public boolean isContextValue() { 41 | return isContextValue; 42 | } 43 | public void setContextValue( boolean isContextValue ) { 44 | this.isContextValue = isContextValue; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /orm/org/ralasafe/db/sql/ContextValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.db.sql; 6 | 7 | import java.util.Map; 8 | 9 | import org.apache.commons.logging.Log; 10 | import org.apache.commons.logging.LogFactory; 11 | import org.ralasafe.RalasafeException; 12 | import org.ralasafe.user.User; 13 | 14 | public class ContextValue implements Value { 15 | private static Log log=LogFactory.getLog( ContextValue.class ); 16 | private String key; 17 | private boolean behindLike; 18 | 19 | public boolean isBehindLike() { 20 | return behindLike; 21 | } 22 | 23 | public void setBehindLike(boolean behindLike) { 24 | this.behindLike = behindLike; 25 | } 26 | 27 | public String toSQL() { 28 | return " ? "; 29 | } 30 | 31 | public String getKey() { 32 | return key; 33 | } 34 | 35 | public void setKey(String key) { 36 | this.key = key; 37 | } 38 | 39 | public Object getValue(User user, Map context) { 40 | if (!context.containsKey(key)) { 41 | String msg="No '" + key + "' found in context."; 42 | log.error( msg ); 43 | throw new RalasafeException("No '" + key + "' found in context."); 44 | } 45 | return context.get(key); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_ca.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: CA 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Aquest camp és obligatori.", 7 | remote: "Si us plau, omple aquest camp.", 8 | email: "Si us plau, escriu una adreça de correu-e vàlida", 9 | url: "Si us plau, escriu una URL vàlida.", 10 | date: "Si us plau, escriu una data vàlida.", 11 | dateISO: "Si us plau, escriu una data (ISO) vàlida.", 12 | number: "Si us plau, escriu un número enter vàlid.", 13 | digits: "Si us plau, escriu només dígits.", 14 | creditcard: "Si us plau, escriu un número de tarjeta vàlid.", 15 | equalTo: "Si us plau, escriu el maateix valor de nou.", 16 | accept: "Si us plau, escriu un valor amb una extensió acceptada.", 17 | maxlength: jQuery.validator.format("Si us plau, no escriguis més de {0} caracters."), 18 | minlength: jQuery.validator.format("Si us plau, no escriguis menys de {0} caracters."), 19 | rangelength: jQuery.validator.format("Si us plau, escriu un valor entre {0} i {1} caracters."), 20 | range: jQuery.validator.format("Si us plau, escriu un valor entre {0} i {1}."), 21 | max: jQuery.validator.format("Si us plau, escriu un valor menor o igual a {0}."), 22 | min: jQuery.validator.format("Si us plau, escriu un valor major o igual a {0}.") 23 | }); -------------------------------------------------------------------------------- /entitlement/org/ralasafe/script/BinaryExpr.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 3 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 4 | */ 5 | package org.ralasafe.script; 6 | 7 | public class BinaryExpr implements Expr { 8 | private Variable variable1; 9 | private Variable variable2; 10 | private Operator operator; 11 | 12 | /** 13 | * Script liks v1.compareTo(v2)==0 14 | * 15 | */ 16 | public String toScript() { 17 | StringBuffer buff=new StringBuffer(); 18 | String v1=variable1.toScript(); 19 | String v2=variable2.toScript(); 20 | buff.append( v1 ).append( ".compareTo(" ).append( v2 ).append( ") " ) 21 | .append( operator.toScript() ).append( " 0 " ); 22 | return buff.toString(); 23 | } 24 | 25 | public Variable getVariable1() { 26 | return variable1; 27 | } 28 | 29 | public void setVariable1( Variable variable1 ) { 30 | this.variable1=variable1; 31 | } 32 | 33 | public Variable getVariable2() { 34 | return variable2; 35 | } 36 | 37 | public void setVariable2( Variable variable2 ) { 38 | this.variable2=variable2; 39 | } 40 | 41 | public Operator getOperator() { 42 | return operator; 43 | } 44 | 45 | public void setOperator( Operator operator ) { 46 | this.operator=operator; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /WebContent/ralasafe/businessData/create.jsp: -------------------------------------------------------------------------------- 1 | <% 2 | /** 3 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 4 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | %> 7 | <%@ page language="java" contentType="text/html; charset=UTF-8" 8 | pageEncoding="UTF-8"%> 9 | 10 | <% 11 | org.ralasafe.util.I18N i18n=org.ralasafe.util.I18N.getWebInstance( request ); 12 | String parentId=request.getParameter("parentId"); 13 | %> 14 | 15 |
16 | 17 | 18 | Yes 19 | No
20 | 21 |
22 | 23 |
24 | 25 |
26 | -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_nl.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: NL 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Dit is een verplicht veld.", 7 | remote: "Controleer dit veld.", 8 | email: "Vul hier een geldig e-mailadres in.", 9 | url: "Vul hier een geldige URL in.", 10 | date: "Vul hier een geldige datum in.", 11 | dateISO: "Vul hier een geldige datum in (ISO-formaat).", 12 | number: "Vul hier een geldig getal in.", 13 | digits: "Vul hier alleen getallen in.", 14 | creditcard: "Vul hier een geldig creditcardnummer in.", 15 | equalTo: "Vul hier dezelfde waarde in.", 16 | accept: "Vul hier een waarde in met een geldige extensie.", 17 | maxlength: jQuery.validator.format("Vul hier maximaal {0} tekens in."), 18 | minlength: jQuery.validator.format("Vul hier minimaal {0} tekens in."), 19 | rangelength: jQuery.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1} tekens."), 20 | range: jQuery.validator.format("Vul hier een waarde in van minimaal {0} en maximaal {1}."), 21 | max: jQuery.validator.format("Vul hier een waarde in kleiner dan of gelijk aan {0}."), 22 | min: jQuery.validator.format("Vul hier een waarde in groter dan of gelijk aan {0}.") 23 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_tr.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: TR 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Bu alanın doldurulması zorunludur.", 7 | remote: "Lütfen bu alanı düzeltin.", 8 | email: "Lütfen geçerli bir e-posta adresi giriniz.", 9 | url: "Lütfen geçerli bir web adresi (URL) giriniz.", 10 | date: "Lütfen geçerli bir tarih giriniz.", 11 | dateISO: "Lütfen geçerli bir tarih giriniz(ISO formatında)", 12 | number: "Lütfen geçerli bir sayı giriniz.", 13 | digits: "Lütfen sadece sayısal karakterler giriniz.", 14 | creditcard: "Lütfen geçerli bir kredi kartı giriniz.", 15 | equalTo: "Lütfen aynı değeri tekrar giriniz.", 16 | accept: "Lütfen geçerli uzantıya sahip bir değer giriniz.", 17 | maxlength: jQuery.validator.format("Lütfen en fazla {0} karakter uzunluğunda bir değer giriniz."), 18 | minlength: jQuery.validator.format("Lütfen en az {0} karakter uzunluğunda bir değer giriniz."), 19 | rangelength: jQuery.validator.format("Lütfen en az {0} ve en fazla {1} uzunluğunda bir değer giriniz."), 20 | range: jQuery.validator.format("Lütfen {0} ile {1} arasında bir değer giriniz."), 21 | max: jQuery.validator.format("Lütfen {0} değerine eşit ya da daha küçük bir değer giriniz."), 22 | min: jQuery.validator.format("Lütfen {0} değerine eşit ya da daha büyük bir değer giriniz.") 23 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_lv.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: LV 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Šis lauks ir obligāts.", 7 | remote: "Lūdzu, pārbaudiet šo lauku.", 8 | email: "Lūdzu, ievadiet derīgu e-pasta adresi.", 9 | url: "Lūdzu, ievadiet derīgu URL adresi.", 10 | date: "Lūdzu, ievadiet derīgu datumu.", 11 | dateISO: "Lūdzu, ievadiet derīgu datumu (ISO).", 12 | number: "Lūdzu, ievadiet derīgu numuru.", 13 | digits: "Lūdzu, ievadiet tikai ciparus.", 14 | creditcard: "Lūdzu, ievadiet derīgu kredītkartes numuru.", 15 | equalTo: "Lūdzu, ievadiet to pašu vēlreiz.", 16 | accept: "Lūdzu, ievadiet vērtību ar derīgu paplašinājumu.", 17 | maxlength: jQuery.validator.format("Lūdzu, ievadiet ne vairāk kā {0} rakstzīmes."), 18 | minlength: jQuery.validator.format("Lūdzu, ievadiet vismaz {0} rakstzīmes."), 19 | rangelength: jQuery.validator.format("Lūdzu ievadiet {0} līdz {1} rakstzīmes."), 20 | range: jQuery.validator.format("Lūdzu, ievadiet skaitli no {0} līdz {1}."), 21 | max: jQuery.validator.format("Lūdzu, ievadiet skaitli, kurš ir mazāks vai vienāds ar {0}."), 22 | min: jQuery.validator.format("Lūdzu, ievadiet skaitli, kurš ir lielāks vai vienāds ar {0}.") 23 | }); -------------------------------------------------------------------------------- /WebContent/ralasafe/common/showTestResult.jsp: -------------------------------------------------------------------------------- 1 | <% 2 | /** 3 | * Copyright (c) 2004-2011 Wang Jinbao(Julian Wong), http://www.ralasafe.com 4 | * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | %> 7 | <%@ page language="java" contentType="text/html; charset=UTF-8" 8 | pageEncoding="UTF-8"%> 9 | <%@page import="org.ralasafe.entitle.ScriptTestResult"%> 10 | <%@page import="java.util.Iterator"%> 11 | <%@page import="java.util.Map"%> 12 | <% 13 | org.ralasafe.util.I18N i18n=org.ralasafe.util.I18N.getWebInstance( request ); 14 | ScriptTestResult testResult=(ScriptTestResult) request.getAttribute( "testResult" ); 15 | if( testResult.isValid() ) { 16 | // test passed! 17 | %> 18 | 19 | <%=i18n.say( "Test_passed" )%> 20 | <% 21 | } else if( testResult.isFailed() ) { 22 | %> 23 | <%=i18n.say( "Runtime_exception" )%>:
<%=testResult.getErrorMessage()%>
24 | <% 25 | } else { 26 | %> 27 | 28 | <%=i18n.say( "Test_failed" )%>
29 | <%=i18n.say( "Variable" )%>
30 | 31 | <% 32 | for( Iterator iter=testResult.getVariableMap().entrySet().iterator(); iter.hasNext(); ) { 33 | Map.Entry entry=(Map.Entry) iter.next(); 34 | %> 35 | <%=entry.getKey() %>=<%=entry.getValue()%>
36 | <% 37 | } 38 | %> 39 | 40 |
41 | <% 42 | } 43 | %> -------------------------------------------------------------------------------- /WebContent/ralasafe/js/validate/messages_ro.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: RO 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "Acest câmp este obligatoriu.", 7 | remote: "Te rugăm să completezi acest câmp.", 8 | email: "Te rugăm să introduci o adresă de email validă", 9 | url: "Te rugăm sa introduci o adresă URL validă.", 10 | date: "Te rugăm să introduci o dată corectă.", 11 | dateISO: "Te rugăm să introduci o dată (ISO) corectă.", 12 | number: "Te rugăm să introduci un număr întreg valid.", 13 | digits: "Te rugăm să introduci doar cifre.", 14 | creditcard: "Te rugăm să introduci un numar de carte de credit valid.", 15 | equalTo: "Te rugăm să reintroduci valoarea.", 16 | accept: "Te rugăm să introduci o valoare cu o extensie validă.", 17 | maxlength: jQuery.validator.format("Te rugăm să nu introduci mai mult de {0} caractere."), 18 | minlength: jQuery.validator.format("Te rugăm să introduci cel puțin {0} caractere."), 19 | rangelength: jQuery.validator.format("Te rugăm să introduci o valoare între {0} și {1} caractere."), 20 | range: jQuery.validator.format("Te rugăm să introduci o valoare între {0} și {1}."), 21 | max: jQuery.validator.format("Te rugăm să introduci o valoare egal sau mai mică decât {0}."), 22 | min: jQuery.validator.format("Te rugăm să introduci o valoare egal sau mai mare decât {0}.") 23 | }); --------------------------------------------------------------------------------