├── .gitignore
├── LICENSE-2.0.txt
├── README.md
├── cache
├── .factorypath
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── cache
│ │ ├── CacheAttributeExtractor.java
│ │ ├── CacheConfig.java
│ │ ├── CacheService.java
│ │ ├── KeySelectionAdapter.java
│ │ ├── SelectionAdapter.java
│ │ ├── ValueSelectionAdapter.java
│ │ └── ehcache
│ │ ├── EhcacheAttributeExtractor.java
│ │ ├── EhcacheKeySelectionAdapter.java
│ │ ├── EhcacheSelectionAdapter.java
│ │ ├── EhcacheService.java
│ │ ├── EhcacheValueSelectionAdapter.java
│ │ ├── ExtractorSupportedSearchAttribute.java
│ │ ├── criteriahandlers
│ │ ├── BasicCriteriaHandler.java
│ │ ├── CriteriaHandler.java
│ │ ├── EqualCriteria.java
│ │ ├── InCriteria.java
│ │ └── LogicalCriteria.java
│ │ └── factory
│ │ └── RepositoryFactory.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
├── datetime
├── META-INF
│ └── MANIFEST.MF
├── build.properties
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── cradle
│ └── datetime
│ ├── DateTimeOperation.java
│ └── dateback
│ ├── DateBackStrategy.java
│ ├── DaysDateBackStrategy.java
│ ├── HoursDateBackStrategy.java
│ ├── MonthsDateBackStrategy.java
│ ├── WeeksDateBackStrategy.java
│ ├── WindowDateBackStrategy.java
│ └── YearsDateBackStrategy.java
├── disruptor
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── disruptor
│ │ ├── DisruptorEvent.java
│ │ ├── DisruptorEventFactory.java
│ │ ├── DisruptorEventHandler.java
│ │ ├── DisruptorOperation.java
│ │ ├── OnDataCallBack.java
│ │ ├── RingBufferOperation.java
│ │ └── workerpool
│ │ ├── SimpleWorkEventHandler.java
│ │ ├── WorkEvent.java
│ │ ├── WorkEventHandler.java
│ │ ├── WorkerPoolExceptionHandler.java
│ │ ├── WorkerPoolOperation.java
│ │ └── WorkerpoolTest.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ └── build.properties
├── keyspace_schema
└── keyspace_schema.properties
├── localization
├── .factorypath
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── localization
│ │ ├── LocalizationException.java
│ │ ├── LocalizationService.java
│ │ ├── Localized.java
│ │ └── impl
│ │ ├── LocalizationServiceImpl.java
│ │ └── LocalizedIndexRowMapper.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
├── mail
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── mail
│ │ ├── MailSendingException.java
│ │ ├── MailService.java
│ │ └── TLSMailService.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
├── oauth
├── .factorypath
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── oauth
│ │ ├── HandshakeAdpater.java
│ │ ├── NotHandshakingException.java
│ │ ├── OAuthAuthorizer.java
│ │ ├── OAuthBuilder.java
│ │ ├── OAuthInvoker.java
│ │ ├── OAuthProvider.java
│ │ ├── OauthEntityNotFoundException.java
│ │ ├── OauthInvokationException.java
│ │ ├── OauthProviderNotSupported.java
│ │ ├── google
│ │ ├── Google2Api.java
│ │ ├── GoogleOAuthBuilder.java
│ │ ├── GoogleOAuthInvoker.java
│ │ ├── GoogleOauthAuthorizer.java
│ │ └── GoogleProfileInvoker.java
│ │ └── impl
│ │ └── OAuthProviderImpl.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
├── platform
├── .factorypath
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── platform
│ │ ├── CradlePlatform.java
│ │ ├── document
│ │ ├── DocumentReader.java
│ │ ├── DocumentReadingExcetion.java
│ │ ├── DocumentWriter.java
│ │ └── JsonDocumentReaderWriter.java
│ │ ├── eventbus
│ │ ├── CradleEventbus.java
│ │ ├── EventbusListener.java
│ │ └── spi
│ │ │ ├── EventbusHandler.java
│ │ │ ├── EventbusListenerRegistrationPrincipal.java
│ │ │ └── TypeEventbusHandler.java
│ │ ├── httpgateway
│ │ ├── HttpAdapter.java
│ │ ├── HttpFilter.java
│ │ ├── HttpMethod.java
│ │ ├── HttpWebService.java
│ │ ├── client
│ │ │ ├── AsynchronousReadingHttpClient.java
│ │ │ ├── AsynchronousReadingWritingHttpClient.java
│ │ │ ├── HttpDocumentResponseCallback.java
│ │ │ └── HttpFileResponseCallback.java
│ │ ├── exception
│ │ │ ├── BadContentType.java
│ │ │ ├── BadRequestException.java
│ │ │ ├── ContentTypeNotSupported.java
│ │ │ ├── HttpException.java
│ │ │ ├── PathNotAccessibleException.java
│ │ │ ├── RedirectException.java
│ │ │ ├── UnauthorizedException.java
│ │ │ └── UnknownResourceException.java
│ │ ├── filter
│ │ │ ├── Filter.java
│ │ │ ├── FilterInvokationHandler.java
│ │ │ ├── PrecedenceFilter.java
│ │ │ ├── path
│ │ │ │ └── PathFilter.java
│ │ │ └── session
│ │ │ │ └── SessionFilter.java
│ │ └── spi
│ │ │ ├── BasicHttpAdapter.java
│ │ │ ├── GatewayRequest.java
│ │ │ ├── GatewayResponse.java
│ │ │ ├── OutputHttpHandler.java
│ │ │ ├── ResponseObject.java
│ │ │ ├── ServiceResponse.java
│ │ │ ├── handler
│ │ │ ├── AsyncIOtHttpHandler.java
│ │ │ ├── AsyncInputHttpHandler.java
│ │ │ ├── AsynchronusRequestHandler.java
│ │ │ ├── BasicHttpHandler.java
│ │ │ ├── MultipartIOHttpHandler.java
│ │ │ └── MultipartRequestHandler.java
│ │ │ └── registration
│ │ │ ├── FilterRegistartionPrinicipal.java
│ │ │ ├── HttpHandlerCreationStrategy.java
│ │ │ └── HttpHandlerResgisterationPrinicipal.java
│ │ ├── spi
│ │ ├── BasicCradleProvider.java
│ │ ├── CradleProvider.java
│ │ ├── RegistrationAgent.java
│ │ └── RegistrationPrincipal.java
│ │ └── websocketgateway
│ │ ├── WebSocket.java
│ │ └── spi
│ │ └── WebsocketHandlerRegistrationPrinicipal.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
├── reporting
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── reporting
│ │ ├── BasicLoggingEvent.java
│ │ ├── ExceptionLoggingEvent.java
│ │ ├── InfoLoggingEvent.java
│ │ ├── LoggingEvent.java
│ │ ├── LoggingWorkHandler.java
│ │ ├── SystemReportingService.java
│ │ ├── SystemReportingServiceProxy.java
│ │ ├── log4j
│ │ └── Log4JSystemReportingService.java
│ │ └── mail
│ │ └── TLSMailSystemReportingService.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
├── repository
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── repository
│ │ ├── BasicRowMapper.java
│ │ ├── IndexRepository.java
│ │ ├── ModelRepository.java
│ │ ├── ModelRepositoryProxy.java
│ │ ├── RowAdapter.java
│ │ ├── StructuredRepository.java
│ │ ├── UnknowRepositoryTargetException.java
│ │ ├── cassandra
│ │ ├── CassandraConfig.java
│ │ ├── CassandraContext.java
│ │ ├── CassandraRowAdapter.java
│ │ ├── CassandraRowMapper.java
│ │ ├── CassandraStructuredRepository.java
│ │ ├── criteriahandlers
│ │ │ ├── AndCriteria.java
│ │ │ ├── BasicCriteriaHandler.java
│ │ │ ├── BetweenCriteria.java
│ │ │ ├── CriteriaHandler.java
│ │ │ ├── EqualCriteria.java
│ │ │ ├── InCriteria.java
│ │ │ └── LeCriteria.java
│ │ ├── mappers
│ │ │ ├── AccountRowMapper.java
│ │ │ ├── BasicCassandraMapper.java
│ │ │ ├── ContentRowMapper.java
│ │ │ ├── OauthRowMapper.java
│ │ │ ├── ProfileRowMapper.java
│ │ │ ├── RoleRowMapper.java
│ │ │ └── TrackingLogRowMapper.java
│ │ └── query
│ │ │ └── CassandraSimpleSelectionAdapter.java
│ │ ├── exception
│ │ ├── ContentException.java
│ │ └── NoResultException.java
│ │ ├── index
│ │ ├── Core.java
│ │ ├── CoreAnnotationIsNotPresent.java
│ │ ├── Index.java
│ │ ├── IndexDocumentObjectFactory.java
│ │ ├── IndexException.java
│ │ ├── IndexId.java
│ │ ├── IndexPorter.java
│ │ ├── IndexQueryAdapter.java
│ │ ├── QueryException.java
│ │ ├── TargetHasNoIndexableFileds.java
│ │ └── solrj
│ │ │ ├── PortingCommand.java
│ │ │ ├── SolrjIndexPorter.java
│ │ │ ├── SolrjIndexRepository.java
│ │ │ ├── SolrjQueryAdapter.java
│ │ │ ├── SolrjRowAdapter.java
│ │ │ └── SolrjRowMapper.java
│ │ ├── key
│ │ ├── RestCriteria.java
│ │ ├── RestProjection.java
│ │ ├── RestSearchKey.java
│ │ ├── exception
│ │ │ ├── BadCriteriaValueException.java
│ │ │ ├── CriteriaNotFoundException.java
│ │ │ ├── InvalidCriteriaException.java
│ │ │ ├── InvalidCriteriaSyntaxException.java
│ │ │ ├── InvalidKeyException.java
│ │ │ ├── ServerFunctionException.java
│ │ │ └── UnknowModelException.java
│ │ ├── functions
│ │ │ ├── BasicServerFunction.java
│ │ │ ├── ServerFunctionHandler.java
│ │ │ └── dateback
│ │ │ │ ├── DateBack.java
│ │ │ │ └── formatter
│ │ │ │ ├── DateBackResultFormatter.java
│ │ │ │ ├── ListDateBackResultFormatter.java
│ │ │ │ └── OneItemDateBackResultFormatter.java
│ │ ├── generator
│ │ │ ├── KeyGenerator.java
│ │ │ └── TemplateKeyGenerator.java
│ │ └── parsers
│ │ │ ├── GsonKeyParser.java
│ │ │ └── KeyParser.java
│ │ ├── models
│ │ ├── RestModel.java
│ │ ├── account
│ │ │ ├── Account.java
│ │ │ ├── Oauth.java
│ │ │ ├── Profile.java
│ │ │ └── Role.java
│ │ ├── content
│ │ │ └── Content.java
│ │ └── tracking
│ │ │ └── TrackingLog.java
│ │ └── query
│ │ ├── BasicSimpleSelectionAdapter.java
│ │ ├── SimpleSelectionAdapter.java
│ │ └── formatter
│ │ └── QueryResultFormatter.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
├── schedule
├── .factorypath
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── schedule
│ │ ├── JobBuildResult.java
│ │ ├── JobBuilder.java
│ │ ├── ScheduleContext.java
│ │ ├── ScheduleService.java
│ │ ├── ScheduledChainJob.java
│ │ ├── ScheduledJob.java
│ │ ├── ScheduledJobListener.java
│ │ ├── SecondlyScheduledChainJob.java
│ │ ├── exception
│ │ └── ScheduleException.java
│ │ ├── quartz
│ │ ├── QuartzJob.java
│ │ ├── QuartzJobBuilder.java
│ │ ├── QuartzScheduleContext.java
│ │ ├── QuartzScheduleService.java
│ │ ├── QuartzScheduledJobListener.java
│ │ └── builder
│ │ │ ├── calendar
│ │ │ ├── BasicCalendarBuilder.java
│ │ │ ├── CalendarBuilder.java
│ │ │ └── WeekCalendarBuilder.java
│ │ │ └── schedule
│ │ │ ├── BasicScheduleBuilder.java
│ │ │ ├── DailyScheduleBuilder.java
│ │ │ ├── QuartzScheduleBuilder.java
│ │ │ ├── SecondlyScheduleBuilder.java
│ │ │ └── WeeklyScheduleBuilder.java
│ │ ├── session
│ │ ├── ObservableScheduledSession.java
│ │ ├── ScheduledSession.java
│ │ ├── SessionException.java
│ │ ├── SessionObserver.java
│ │ ├── SessionStatus.java
│ │ ├── SessionStatusCallback.java
│ │ └── SessionTrackObserver.java
│ │ └── tracks
│ │ ├── DailyTrack.java
│ │ ├── MinuteTrack.java
│ │ ├── Track.java
│ │ ├── TrackException.java
│ │ └── WeeklyTrack.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
├── security
├── .factorypath
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── cradle
│ │ └── security
│ │ ├── AuthenticationFailureException.java
│ │ ├── SecurityService.java
│ │ ├── User.java
│ │ └── shiro
│ │ ├── AccountAuthenticationInfo.java
│ │ ├── AccountAuthorizationInfo.java
│ │ ├── RepositoryRealm.java
│ │ ├── ShiroSecurityService.java
│ │ ├── ShiroUser.java
│ │ └── SimpleSessionKey.java
│ └── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ └── build.properties
└── vertx
├── .factorypath
├── pom.xml
└── src
├── main
├── java
│ └── org
│ │ └── cradle
│ │ └── platform
│ │ └── vertx
│ │ ├── DeploymentReporter.java
│ │ ├── HttpFilterAgent.java
│ │ ├── VertxCradlePlatform.java
│ │ ├── eventbus
│ │ ├── VertxEventbusService.java
│ │ └── VertxTextEventbusHandler.java
│ │ ├── handlers
│ │ ├── ContentRequestHandler.java
│ │ ├── FileRequestHandler.java
│ │ └── HttpInvokationHandler.java
│ │ ├── httpgateway
│ │ ├── AsyncInputStream.java
│ │ ├── RemovableRouteMatcher.java
│ │ ├── VertxAsynchronusRequest.java
│ │ ├── VertxHttpAdapter.java
│ │ ├── VertxHttpGateway.java
│ │ └── client
│ │ │ ├── DocumentRequestHandler.java
│ │ │ ├── FileRequestHandler.java
│ │ │ └── VertxReadingHttpClient.java
│ │ └── websocketgateway
│ │ ├── VertxWebsocketAdapter.java
│ │ ├── VertxWebsocketGateway.java
│ │ └── VertxWebsocketRequest.java
└── resources
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── OSGI-INF
│ └── blueprint
│ │ └── config.xml
│ ├── build.properties
│ ├── html
│ ├── webSocketMessage_Broadcast.html
│ ├── webSocketMessage_Synchronous.html
│ └── websocketMessage_Reciever.html
│ └── js
│ ├── jquery
│ └── jquery-2.1.1.js
│ └── sockjs
│ └── sockjs-0.3.min.js
└── test
└── java
└── org
└── cradle
└── gateway
└── vertx
└── test
├── Calculation.java
├── HelloWorldController.java
├── Message.java
└── StandaloneGatewayTest.java
/.gitignore:
--------------------------------------------------------------------------------
1 | /**/mods
2 | /**/zipfiles
3 | /**/logs
4 | /**/target
5 | /**/.metadata
6 | /**/.settings
7 | /**/.classpath
8 | /**/.project
9 | /**/bin
10 | /**/vertx_temp
11 | /**/*/*/data/index
12 | /**/*/*/data/tlog
13 |
14 | # Backup files
15 | *~
16 |
17 | # IntelliJ IDEA
18 | /**/.idea/
19 | /**/*.iml
20 |
21 | # Local log4j files (used to supply different logging parameters during development)
22 | log4j-local.properties
23 |
--------------------------------------------------------------------------------
/cache/.factorypath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/cache/src/main/java/org/cradle/cache/CacheAttributeExtractor.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright mcplissken.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.cradle.cache;
17 |
18 | /**
19 | * @author Sherief Shawky
20 | * @email mcrakens@gmail.com
21 | * @date Jan 27, 2015
22 | */
23 | public abstract class CacheAttributeExtractor {
24 |
25 | private String attributeName;
26 |
27 | public CacheAttributeExtractor(String attributeName) {
28 |
29 | this.attributeName = attributeName;
30 | }
31 |
32 | /**
33 | * @return the attributeName
34 | */
35 | public String getAttributeName() {
36 | return attributeName;
37 | }
38 |
39 | public abstract Object extract(T cachedObject);
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/cache/src/main/java/org/cradle/cache/KeySelectionAdapter.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright mcplissken.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.cradle.cache;
17 |
18 |
19 | /**
20 | * @author Sherief Shawky
21 | * @email mcrakens@gmail.com
22 | * @date Sep 2, 2014
23 | */
24 | public interface KeySelectionAdapter extends SelectionAdapter {
25 |
26 | public SelectionAdapter eq(Object value);
27 |
28 | public SelectionAdapter like(Object value);
29 |
30 | public SelectionAdapter in(Object[] values);
31 |
32 | public SelectionAdapter orderBy(boolean asc);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/cache/src/main/java/org/cradle/cache/SelectionAdapter.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package org.cradle.cache;
5 |
6 | import java.util.Map;
7 |
8 | /**
9 | * @author Sherief Shawky
10 | * @email mcrakens@gmail.com
11 | * @date Sep 4, 2014
12 | */
13 | public interface SelectionAdapter {
14 |
15 | public abstract SelectionAdapter page(int size);
16 |
17 | public abstract Map