├── hypersocket-inbox
├── .gitignore
├── src
│ └── main
│ │ └── java
│ │ └── com
│ │ └── hypersocket
│ │ └── inbox
│ │ └── EmailProcessor.java
└── .project
├── hypersocket-netty
├── src
│ ├── test
│ │ └── resources
│ │ │ └── server.properties
│ └── main
│ │ ├── webapp
│ │ ├── test.html
│ │ └── WEB-INF
│ │ │ └── web.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hypersocket
│ │ │ ├── ip
│ │ │ └── IPRestrictionListener.java
│ │ │ └── netty
│ │ │ ├── forwarding
│ │ │ └── NettyWebsocketClient.java
│ │ │ └── Request.java
│ │ └── resources
│ │ └── i18n
│ │ └── NettyServer.properties
└── .gitignore
├── hypersocket.properties
├── hypersocket-templates
├── .gitignore
├── src
│ └── main
│ │ ├── resources
│ │ └── upgrade
│ │ │ └── templates_1_DOT_0_DOT_4.mysql
│ │ └── java
│ │ └── com
│ │ └── hypersocket
│ │ └── template
│ │ ├── TemplateStatus.java
│ │ └── TemplateType.java
└── .project
├── hypersocket-common
├── .gitignore
└── src
│ └── main
│ └── java
│ └── com
│ └── hypersocket
│ ├── extensions
│ └── ExtensionState.java
│ ├── json
│ ├── JsonRoleResourceStatus.java
│ ├── JsonRole.java
│ ├── JsonResource.java
│ ├── JsonPrincipalType.java
│ ├── JsonResourceStatus.java
│ ├── JsonResourceStatusTemplate.java
│ └── JsonResourceList.java
│ ├── utils
│ ├── ITokenResolver.java
│ ├── StaticResolver.java
│ └── HttpUtils.java
│ ├── properties
│ ├── Property.java
│ ├── XmlTemplatePropertyStore.java
│ ├── PropertyStore.java
│ └── PropertyTemplate.java
│ └── input
│ ├── JavaScriptField.java
│ ├── ImgField.java
│ ├── DivField.java
│ ├── InputFieldType.java
│ ├── AnchorField.java
│ ├── HiddenInputField.java
│ ├── TextInputField.java
│ ├── PasswordInputField.java
│ └── SelectInputField.java
├── hypersocket-core
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── i18n
│ │ │ │ ├── SecretKeyService.properties
│ │ │ │ ├── LogonController.properties
│ │ │ │ ├── ConfigurationController.properties
│ │ │ │ ├── ClientDownloadService.properties
│ │ │ │ ├── BrowserLaunchable.properties
│ │ │ │ ├── UserInterfaceStateService.properties
│ │ │ │ ├── I18NService.properties
│ │ │ │ ├── EventService.properties
│ │ │ │ ├── AssignableResourceService.properties
│ │ │ │ ├── OverviewWidgetService.properties
│ │ │ │ ├── AbstractReconcileService.properties
│ │ │ │ ├── ConfigurationService.properties
│ │ │ │ └── TemplateService.properties
│ │ │ ├── version.properties
│ │ │ ├── userTemplate.xml
│ │ │ ├── groupTemplate.xml
│ │ │ ├── triggerTemplate.xml
│ │ │ ├── jobResourceTemplate.xml
│ │ │ ├── schedulerResourceTemplate.xml
│ │ │ ├── upgrade
│ │ │ │ ├── core_1_DOT_2_DOT_0.mysql
│ │ │ │ ├── core_1_DOT_2_DOT_0.derby
│ │ │ │ └── core_1_DOT_2_DOT_0.postgres
│ │ │ ├── logoResource.xml
│ │ │ ├── encryptedTemplate.xml
│ │ │ ├── systemTemplates.xml
│ │ │ ├── roleTemplate.xml
│ │ │ ├── tasks
│ │ │ │ ├── searchResourceTask.xml
│ │ │ │ ├── executeCommand.xml
│ │ │ │ └── retryTask.xml
│ │ │ ├── localRealmTemplate.xml
│ │ │ ├── realmTemplate.xml
│ │ │ └── ehcache.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── hypersocket
│ │ │ ├── tables
│ │ │ ├── Sort.java
│ │ │ ├── Column.java
│ │ │ └── ColumnSort.java
│ │ │ ├── message
│ │ │ ├── MessageEvent.java
│ │ │ ├── MessageResourceColumns.java
│ │ │ └── MessageResourceRepository.java
│ │ │ ├── events
│ │ │ ├── SynchronousEvent.java
│ │ │ ├── SystemEventStatus.java
│ │ │ ├── EventPropertyCollector.java
│ │ │ ├── AbstractEvent.java
│ │ │ └── CommonAttributes.java
│ │ │ ├── realm
│ │ │ ├── MediaType.java
│ │ │ ├── PrincipalSuspensionType.java
│ │ │ ├── PrincipalStatus.java
│ │ │ ├── VariableReplacement.java
│ │ │ ├── MediaNotFoundException.java
│ │ │ ├── UserVariableReplacement.java
│ │ │ ├── RealmColumns.java
│ │ │ ├── PrincipalColumns.java
│ │ │ ├── RealmListener.java
│ │ │ ├── PrincipalRepository.java
│ │ │ ├── RealmAdapter.java
│ │ │ ├── PrincipalType.java
│ │ │ ├── UserPrincipal.java
│ │ │ ├── PrincipalSuspensionRepository.java
│ │ │ └── PasswordPermission.java
│ │ │ ├── triggers
│ │ │ ├── TriggerConditionType.java
│ │ │ ├── TriggerType.java
│ │ │ ├── ReplacementVariableProvider.java
│ │ │ ├── TriggerResultType.java
│ │ │ ├── TaskResultCallback.java
│ │ │ ├── ValidationException.java
│ │ │ ├── TriggerResourceColumns.java
│ │ │ ├── TriggerConditionProvider.java
│ │ │ ├── TriggerExecutor.java
│ │ │ ├── conditions
│ │ │ │ ├── Condition.java
│ │ │ │ ├── IsTrueCondition.java
│ │ │ │ ├── IsNotTrueCondition.java
│ │ │ │ ├── NotEqualsCondition.java
│ │ │ │ ├── EndsWithCondition.java
│ │ │ │ ├── ContainsCondition.java
│ │ │ │ ├── StartsWithCondition.java
│ │ │ │ ├── DoesNotEndsWithCondition.java
│ │ │ │ ├── DoesNotStartsWithCondition.java
│ │ │ │ └── IsEmptyCondition.java
│ │ │ └── TriggerResourceRepository.java
│ │ │ ├── feedback
│ │ │ ├── FeedbackStatus.java
│ │ │ └── FeedbackService.java
│ │ │ ├── jobs
│ │ │ ├── JobState.java
│ │ │ ├── InvalidJobStateException.java
│ │ │ ├── JobResourceRepository.java
│ │ │ ├── JobResourceColumns.java
│ │ │ └── TrackedJobData.java
│ │ │ ├── properties
│ │ │ ├── DatabasePropertyStoreFactory.java
│ │ │ ├── PropertyFilter.java
│ │ │ ├── ResourceProperty.java
│ │ │ ├── PropertyEntity.java
│ │ │ ├── ImageProperty.java
│ │ │ ├── DatabasePropertyStoreFactoryImpl.java
│ │ │ ├── ResourcePropertyStore.java
│ │ │ ├── PropertyResolver.java
│ │ │ ├── NameValuePair.java
│ │ │ └── PropertiesFileProperty.java
│ │ │ ├── attributes
│ │ │ ├── user
│ │ │ │ ├── UserAttributeType.java
│ │ │ │ ├── UserAttributeCategoryRepository.java
│ │ │ │ ├── UserAttributeColumns.java
│ │ │ │ ├── UserAttributeCategoryColumns.java
│ │ │ │ └── UserAttributeRepository.java
│ │ │ └── AttributeCategory.java
│ │ │ ├── upgrade
│ │ │ └── UpgradeServiceListener.java
│ │ │ ├── auth
│ │ │ ├── AuthenticationModuleType.java
│ │ │ ├── FallbackAuthenticationRequired.java
│ │ │ ├── AuthenticationServiceListener.java
│ │ │ ├── AuthenticationSchemeSelector.java
│ │ │ ├── PrincipalNotFoundException.java
│ │ │ ├── PasswordEnabledAuthenticatedService.java
│ │ │ ├── InvalidAuthenticationContext.java
│ │ │ ├── AuthenticationException.java
│ │ │ ├── AuthenticatorResult.java
│ │ │ └── BrowserEnvironment.java
│ │ │ ├── tasks
│ │ │ ├── email
│ │ │ │ ├── EmailAttachmentSource.java
│ │ │ │ ├── EmailTaskRepository.java
│ │ │ │ └── EmailTaskRepositoryImpl.java
│ │ │ ├── command
│ │ │ │ ├── ExecuteCommandRepository.java
│ │ │ │ └── ExecuteCommandRepositoryImpl.java
│ │ │ ├── Task.java
│ │ │ ├── TaskResult.java
│ │ │ ├── alert
│ │ │ │ └── AlertTaskRepository.java
│ │ │ └── TaskProviderService.java
│ │ │ ├── certificates
│ │ │ ├── CertificateType.java
│ │ │ ├── CertificateResourceRepository.java
│ │ │ ├── CertificateResourceColumns.java
│ │ │ └── CertificateResourceRepositoryImpl.java
│ │ │ ├── migration
│ │ │ ├── exception
│ │ │ │ ├── MigrationProcessRealmNotFoundException.java
│ │ │ │ └── MigrationProcessRealmAlreadyExistsThrowable.java
│ │ │ ├── annotation
│ │ │ │ ├── AllowNameOnlyLookUp.java
│ │ │ │ ├── LookUpKeys.java
│ │ │ │ └── Order.java
│ │ │ ├── repository
│ │ │ │ ├── MigrationExportCriteriaBuilder.java
│ │ │ │ └── MigrationLookupCriteriaBuilder.java
│ │ │ ├── exporter
│ │ │ │ ├── MigrationExporter.java
│ │ │ │ └── JsonPropertiesAdder.java
│ │ │ ├── importer
│ │ │ │ └── MigrationImporter.java
│ │ │ ├── customized
│ │ │ │ ├── MigrationCustomExport.java
│ │ │ │ └── MigrationCustomImport.java
│ │ │ ├── mixin
│ │ │ │ ├── entity
│ │ │ │ │ ├── RealmMigrationMixIn.java
│ │ │ │ │ ├── CertificateResourceMigrationMixIn.java
│ │ │ │ │ ├── LocalUserMigrationMixIn.java
│ │ │ │ │ ├── PermissionCategoryMigrationMixIn.java
│ │ │ │ │ └── JobResourceMigrationMixIn.java
│ │ │ │ └── MigrationMixIn.java
│ │ │ ├── properties
│ │ │ │ └── MigrationProperties.java
│ │ │ └── execution
│ │ │ │ └── stack
│ │ │ │ └── MigrationCurrentInfo.java
│ │ │ ├── interfaceState
│ │ │ ├── UserInterfaceStateListener.java
│ │ │ ├── UserInterfaceStateRepository.java
│ │ │ └── UserInterfaceState.java
│ │ │ ├── automation
│ │ │ ├── AutomationRepeatType.java
│ │ │ ├── AutomationResourceRepository.java
│ │ │ ├── AutomationResourceColumns.java
│ │ │ └── DailySchedulerJob.java
│ │ │ ├── util
│ │ │ └── Utils.java
│ │ │ ├── repository
│ │ │ ├── CriteriaConfiguration.java
│ │ │ ├── AbstractEntityRepository.java
│ │ │ └── DistinctRootEntity.java
│ │ │ ├── scheduler
│ │ │ ├── NotScheduledException.java
│ │ │ ├── SchedulerResourceRepository.java
│ │ │ ├── SchedulerResourceColumns.java
│ │ │ └── SchedulerResourceRepositoryImpl.java
│ │ │ ├── secret
│ │ │ ├── SecretKeyRepository.java
│ │ │ └── SecretKeyRepositoryImpl.java
│ │ │ ├── session
│ │ │ ├── ResourceSession.java
│ │ │ ├── SessionColumns.java
│ │ │ ├── events
│ │ │ │ ├── SessionClosedEvent.java
│ │ │ │ └── SessionStateEvent.java
│ │ │ └── SessionResourceToken.java
│ │ │ ├── context
│ │ │ ├── ContextAnnotationService.java
│ │ │ └── SystemContextRequired.java
│ │ │ ├── encrypt
│ │ │ ├── EncryptionService.java
│ │ │ ├── Encryptor.java
│ │ │ └── EncryptionProvider.java
│ │ │ ├── transactions
│ │ │ ├── TransactionCallbackWithError.java
│ │ │ └── TransactionService.java
│ │ │ ├── upload
│ │ │ ├── FileStore.java
│ │ │ ├── FileUploadRepository.java
│ │ │ ├── FileUploadColumn.java
│ │ │ └── FileUploadRepositoryImpl.java
│ │ │ ├── resource
│ │ │ ├── TransactionOperation.java
│ │ │ ├── ResourceColumns.java
│ │ │ ├── ResourceImportException.java
│ │ │ ├── TransactionAdapter.java
│ │ │ ├── ResourceExportException.java
│ │ │ ├── AbstractResource.java
│ │ │ ├── UnauthorizedResourceAccessEvent.java
│ │ │ ├── PersonalRestriction.java
│ │ │ ├── RealmCriteria.java
│ │ │ ├── RealmOrSystemRealmCriteria.java
│ │ │ ├── ExportedResource.java
│ │ │ ├── ResourceNotFoundException.java
│ │ │ └── AssignableResourceRepository.java
│ │ │ ├── annotation
│ │ │ ├── HypersocketExtensionPoint.java
│ │ │ ├── AnnotationService.java
│ │ │ └── HypersocketExtension.java
│ │ │ ├── derby
│ │ │ └── DefaultClobDerbyDialect.java
│ │ │ ├── service
│ │ │ ├── ServiceManagementService.java
│ │ │ ├── ManageableService.java
│ │ │ └── ServiceManagementServiceImpl.java
│ │ │ ├── json
│ │ │ └── JsonMapper.java
│ │ │ ├── notify
│ │ │ ├── NotificationProvider.java
│ │ │ └── NotificationService.java
│ │ │ ├── config
│ │ │ ├── ConfigurationRepository.java
│ │ │ └── SystemConfigurationRepository.java
│ │ │ ├── browser
│ │ │ ├── BrowserLaunchableColumns.java
│ │ │ └── BrowserLaunchable.java
│ │ │ ├── dashboard
│ │ │ ├── message
│ │ │ │ ├── DashboardMessageService.java
│ │ │ │ └── DashboardMessageRepository.java
│ │ │ └── OverviewWidgetService.java
│ │ │ ├── reconcile
│ │ │ └── AbstractReconcileService.java
│ │ │ ├── email
│ │ │ ├── EmailTrackerRepository.java
│ │ │ └── EmailTrackerService.java
│ │ │ ├── constraint
│ │ │ ├── ConstraintAction.java
│ │ │ └── ConstraintType.java
│ │ │ ├── permissions
│ │ │ ├── PermissionStrategy.java
│ │ │ └── PermissionType.java
│ │ │ └── local
│ │ │ └── LocalRealmProvider.java
│ └── test
│ │ ├── resources
│ │ └── test-database.properties
│ │ └── java
│ │ └── com
│ │ └── hypersocket
│ │ └── tests
│ │ ├── ContextLoadingTest.java
│ │ └── ExampleTest.java
├── .gitignore
└── conf
│ ├── .gitignore
│ ├── nss.cfg
│ └── nss64.cfg
├── hypersocket-json
├── .gitignore
└── src
│ └── main
│ └── java
│ └── com
│ └── hypersocket
│ ├── tables
│ ├── BootstrapTableResourceProcessor.java
│ ├── BootstrapTablesResult.java
│ └── json
│ │ └── BootstrapTablePageProcessor.java
│ ├── auth
│ └── json
│ │ ├── UnauthorizedException.java
│ │ ├── RedirectException.java
│ │ └── AuthenticationRequired.java
│ ├── upload
│ └── json
│ │ └── IconEntry.java
│ ├── json
│ ├── WebMvcMultipartResolver.java
│ └── FileUpload.java
│ └── resource
│ └── ResourceUpdate.java
├── hypersocket-server
├── .gitignore
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── hibernate-ext.properties
│ │ │ ├── interfaceResourceTemplate.xml
│ │ │ └── i18n
│ │ │ │ └── URLForwardingResourceService.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── hypersocket
│ │ │ └── server
│ │ │ ├── interfaces
│ │ │ ├── http
│ │ │ │ ├── HTTPProtocol.java
│ │ │ │ ├── HTTPInterfaceResourceRepository.java
│ │ │ │ ├── HTTPInterfaceResourceColumns.java
│ │ │ │ └── HTTPInterfaceResourceRepositoryImpl.java
│ │ │ ├── InterfaceResourceRepository.java
│ │ │ ├── InterfaceRegistrationService.java
│ │ │ ├── InterfaceRegistrationServiceImpl.java
│ │ │ └── InterfaceResourceRepositoryImpl.java
│ │ │ ├── forward
│ │ │ ├── url
│ │ │ │ ├── URLForwardingResource.java
│ │ │ │ ├── URLForwardingResourceRepository.java
│ │ │ │ ├── URLForwardingResourceService.java
│ │ │ │ └── URLForwardingResourceRepositoryImpl.java
│ │ │ ├── ForwardingResource.java
│ │ │ ├── ForwardingTransport.java
│ │ │ └── ForwardingService.java
│ │ │ ├── ClientConnector.java
│ │ │ ├── handlers
│ │ │ └── impl
│ │ │ │ ├── ContentFilter.java
│ │ │ │ └── RedirectException.java
│ │ │ ├── events
│ │ │ ├── ServerStartedEvent.java
│ │ │ ├── ServerStoppedEvent.java
│ │ │ ├── ServerStartingEvent.java
│ │ │ ├── ServerStoppingEvent.java
│ │ │ └── WebappCreatedEvent.java
│ │ │ └── websocket
│ │ │ ├── TCPForwardingClientCallback.java
│ │ │ ├── WebsocketClient.java
│ │ │ └── WebsocketClientCallback.java
│ └── test
│ │ └── resources
│ │ └── http.properties
└── resources
│ └── http.properties
├── hypersocket-tasks
├── .gitignore
└── src
│ └── main
│ ├── resources
│ ├── i18n
│ │ ├── ResumeUserTask.properties
│ │ ├── SystemTriggerAction.properties
│ │ ├── SleepTask.properties
│ │ ├── ResolveIPTask.properties
│ │ ├── SuspendUserTask.properties
│ │ └── MonitorPortTask.properties
│ └── tasks
│ │ ├── unblockIP.xml
│ │ ├── resumeUser.xml
│ │ ├── resolveIPTask.xml
│ │ ├── sleepTask.xml
│ │ ├── systemRestart.xml
│ │ ├── blockIP.xml
│ │ ├── suspendUser.xml
│ │ └── monitorPort.xml
│ └── java
│ └── com
│ └── hypersocket
│ └── tasks
│ ├── sleep
│ ├── SleepTaskRepository.java
│ └── SleepTaskRepositoryImpl.java
│ ├── ip
│ ├── block
│ │ ├── BlockIPTaskRepository.java
│ │ └── BlockIPTaskRepositoryImpl.java
│ ├── resolve
│ │ ├── ResolveIPTaskRepository.java
│ │ └── ResolveIPTaskRepositoryImpl.java
│ ├── unblock
│ │ ├── UnblockIPTaskRepository.java
│ │ └── UnblockIPTaskRepositoryImpl.java
│ └── monitor
│ │ ├── MonitorPortTaskRepository.java
│ │ └── MonitorPortTaskRepositoryImpl.java
│ ├── suspend
│ ├── ResumeUserTaskRepository.java
│ ├── SuspendUserTaskRepository.java
│ ├── ResumeUserTaskRepositoryImpl.java
│ └── SuspendUserTaskRepositoryImpl.java
│ ├── system
│ ├── SystemTriggerActionRepository.java
│ └── SystemTriggerActionRepositoryImpl.java
│ └── user
│ └── password
│ ├── GeneratePasswordTaskRepository.java
│ └── GeneratePasswordTaskRepositoryImpl.java
├── README
├── hypersocket-tests
├── certificates
│ └── cert.pfx
├── .gitignore
├── .settings
│ ├── org.eclipse.m2e.core.prefs
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── default-conf
│ └── log4j.properties
├── src
│ └── test
│ │ └── java
│ │ └── com
│ │ └── hypersocket
│ │ └── tests
│ │ └── json
│ │ ├── utils
│ │ ├── MultipartObject.java
│ │ └── PropertyObject.java
│ │ ├── realms
│ │ └── WithAdminPermissionTests.java
│ │ ├── roles
│ │ └── WithAdminPermissionTests.java
│ │ ├── server
│ │ └── WithAdminPermissionTests.java
│ │ ├── session
│ │ └── WithAdminPermissionTests.java
│ │ ├── currentRealm
│ │ └── WithAdminPermissionTests.java
│ │ ├── permissions
│ │ └── UnauthorizedTest.java
│ │ └── certificates
│ │ └── WithAdminPermissionTest.java
└── .project
├── .gitignore
├── database.properties
├── log4j.properties
└── COPYRIGHT
/hypersocket-inbox/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | /.settings/
3 |
--------------------------------------------------------------------------------
/hypersocket-netty/src/test/resources/server.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/hypersocket.properties:
--------------------------------------------------------------------------------
1 | http.port=8080
2 | https.port=8443
--------------------------------------------------------------------------------
/hypersocket-templates/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | /.settings/
3 |
--------------------------------------------------------------------------------
/hypersocket-common/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /.settings
3 | /bin/
4 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/SecretKeyService.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/hypersocket-json/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /.settings
3 | /bin/
4 |
--------------------------------------------------------------------------------
/hypersocket-server/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /.settings
3 | /bin/
4 |
--------------------------------------------------------------------------------
/hypersocket-tasks/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | /.settings/
3 | /bin/
4 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/LogonController.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/hypersocket-core/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /.settings
3 | /bin
4 | /data
5 | /derby.log
6 |
--------------------------------------------------------------------------------
/hypersocket-core/conf/.gitignore:
--------------------------------------------------------------------------------
1 | /.private/
2 | /secrets.pub
3 | /secrets
4 | *.dat
5 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/version.properties:
--------------------------------------------------------------------------------
1 | maven.version=${project.version}
--------------------------------------------------------------------------------
/hypersocket-netty/.gitignore:
--------------------------------------------------------------------------------
1 | /conf
2 | /data
3 | /target
4 | /.settings
5 | /derby.log
6 | /bin/
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/ConfigurationController.properties:
--------------------------------------------------------------------------------
1 | message.saved=Configuration saved
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Hypersocket Framework is built on Netty, Spring and Hibernate and provides a quick and easy way to build web-based JSON services.
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/ClientDownloadService.properties:
--------------------------------------------------------------------------------
1 | clientDownloads.title=Downloads
2 | client.download=Download Client
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/userTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/hypersocket-tests/certificates/cert.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ludup/hypersocket-framework/HEAD/hypersocket-tests/certificates/cert.pfx
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/groupTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/resources/hibernate-ext.properties:
--------------------------------------------------------------------------------
1 | #Extend hibernate package scanning
2 | scanPackage=com.hypersocket.server.interfaces
--------------------------------------------------------------------------------
/hypersocket-server/src/main/resources/interfaceResourceTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/hypersocket-tests/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /.settings
3 | *.log
4 | /UsersjizaguirAppDataLocalTemphypersocket1835397171077018848data/
5 | /bin/
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.settings/
2 | /client-common/
3 | /client-gui/
4 | /client-gui-jfx/
5 | /client-netty/
6 | /client-service/
7 | /hypersocket-client/
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tables/Sort.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tables;
2 |
3 | public enum Sort {
4 | ASC,
5 | DESC
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/triggerTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/hypersocket-server/resources/http.properties:
--------------------------------------------------------------------------------
1 | # Properties for the abstract http tests
2 | http.protocol=http
3 | http.server=localhost
4 | http.port=8080
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/jobResourceTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/hypersocket-netty/src/main/webapp/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Test Page
4 |
5 |
6 | It works!
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-tests/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/message/MessageEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.message;
2 |
3 | public interface MessageEvent {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/hypersocket-server/src/test/resources/http.properties:
--------------------------------------------------------------------------------
1 | # Properties for the abstract http tests
2 | http.protocol=http
3 | http.server=localhost
4 | http.port=8080
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/events/SynchronousEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.events;
2 |
3 | public interface SynchronousEvent {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/MediaType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | public enum MediaType {
4 |
5 | EMAIL,
6 | PHONE
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/schedulerResourceTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/hypersocket-templates/src/main/resources/upgrade/templates_1_DOT_0_DOT_4.mysql:
--------------------------------------------------------------------------------
1 | EXIT IF FRESH
2 | ALTER TABLE templates CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tables/Column.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tables;
2 |
3 | public interface Column {
4 |
5 | public String getColumnName();
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-templates/src/main/java/com/hypersocket/template/TemplateStatus.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.template;
2 |
3 | public enum TemplateStatus {
4 | PRIVATE, PUBLIC
5 | }
6 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/upgrade/core_1_DOT_2_DOT_0.mysql:
--------------------------------------------------------------------------------
1 | EXIT IF FRESH
2 | TRY
3 | DROP INDEX uuid ON local_user_groups;
4 | DROP INDEX gguid ON local_group_groups;
5 | CATCH
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/TriggerConditionType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | public enum TriggerConditionType {
4 |
5 | ALL, ANY;
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/feedback/FeedbackStatus.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.feedback;
2 |
3 | public enum FeedbackStatus {
4 |
5 | INFO, WARNING, ERROR, SUCCESS
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/jobs/JobState.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.jobs;
2 |
3 | public enum JobState {
4 |
5 | SCHEDULED, IN_PROGRESS, COMPLETE, FAILED, ERROR
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/events/SystemEventStatus.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.events;
2 |
3 | public enum SystemEventStatus {
4 | SUCCESS,
5 | FAILURE,
6 | WARNING
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/DatabasePropertyStoreFactory.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | public interface DatabasePropertyStoreFactory {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/PrincipalSuspensionType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | public enum PrincipalSuspensionType {
4 |
5 | MANUAL,
6 | EXPIRY
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/TriggerType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | public enum TriggerType {
4 |
5 | TRIGGER,
6 | AUTOMATION,
7 | WORKFLOW
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/extensions/ExtensionState.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.extensions;
2 |
3 | public enum ExtensionState {
4 | NOT_INSTALLED, INSTALLED, UPDATABLE
5 | }
6 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/attributes/user/UserAttributeType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.attributes.user;
2 |
3 | public enum UserAttributeType {
4 |
5 | TEXT,
6 | PASSWORD
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/PrincipalStatus.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | public enum PrincipalStatus {
4 | ENABLED,
5 | DISABLED,
6 | LOCKED,
7 | EXPIRED
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/interfaces/http/HTTPProtocol.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.interfaces.http;
2 |
3 | public enum HTTPProtocol {
4 | HTTP,
5 | HTTPS
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-templates/src/main/java/com/hypersocket/template/TemplateType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.template;
2 |
3 | public enum TemplateType {
4 | BROWSER_SSO, SAML_SSO, APPLICATION, TRIGGER
5 | }
6 |
--------------------------------------------------------------------------------
/hypersocket-core/conf/nss.cfg:
--------------------------------------------------------------------------------
1 | name = NSScrypto
2 | attributes = compatibility
3 | nssLibraryDirectory = /usr/lib/
4 | nssSecmodDirectory = /etc/nervepoint/.private
5 | nssDbMode = readWrite
6 | nssModule = fips
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/json/JsonRoleResourceStatus.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.json;
2 |
3 | public class JsonRoleResourceStatus extends JsonResourceStatusTemplate {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/utils/ITokenResolver.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.utils;
2 |
3 | public interface ITokenResolver {
4 |
5 | public String resolveToken(String tokenName);
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/upgrade/UpgradeServiceListener.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.upgrade;
2 |
3 | public interface UpgradeServiceListener {
4 |
5 | public void onUpgradeComplete();
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/i18n/ResumeUserTask.properties:
--------------------------------------------------------------------------------
1 | resumeUser=Resume User
2 | category.resumeUser.label=ResumeUser
3 | resumeUser.name=Username
4 | resumeUser.name.info=The username of the user to resume.
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/AuthenticationModuleType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.auth;
2 |
3 | public enum AuthenticationModuleType {
4 |
5 | HIDDEN, BASIC, CHALLENGE_RESPONSE, HTML, CUSTOM;
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/PropertyFilter.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | public interface PropertyFilter {
4 |
5 | void filterProperty(AbstractPropertyTemplate t);
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/ResourceProperty.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 |
4 | public interface ResourceProperty extends Property {
5 |
6 | Long getResourceId();
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/VariableReplacement.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | public interface VariableReplacement {
4 |
5 | String replaceVariables(T source, String value);
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/conf/nss64.cfg:
--------------------------------------------------------------------------------
1 | name = NSScrypto
2 | attributes = compatibility
3 | nssLibraryDirectory = /usr/lib/x86_64-linux-gnu/
4 | nssSecmodDirectory = /etc/nervepoint/.private
5 | nssDbMode = readWrite
6 | nssModule = fips
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/email/EmailAttachmentSource.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.email;
2 |
3 | public interface EmailAttachmentSource {
4 |
5 | public String[] getEmailAttachments();
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/ReplacementVariableProvider.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | public interface ReplacementVariableProvider {
4 |
5 | String getReplacementValue(String variable);
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/upgrade/core_1_DOT_2_DOT_0.derby:
--------------------------------------------------------------------------------
1 | EXIT IF FRESH
2 | TRY
3 | ALTER TABLE LOCAL_USER_GROUPS DROP CONSTRAINT SQL160224134034491;
4 | ALTER TABLE LOCAL_GROUP_GROUPS DROP CONSTRAINT SQL160224134034462;
5 | CATCH
--------------------------------------------------------------------------------
/database.properties:
--------------------------------------------------------------------------------
1 | jdbc.driver.className=org.apache.derby.jdbc.EmbeddedDriver
2 | jdbc.url=jdbc:derby:data;create=true
3 | jdbc.username=hypersocket
4 | jdbc.password=hypersocket
5 | jdbc.hibernate.dialect=com.hypersocket.derby.DefaultClobDerbyDialect
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/certificates/CertificateType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.certificates;
2 |
3 |
4 | public enum CertificateType {
5 |
6 | RSA_1024, RSA_2048, DSA_1024, ECDSA_256, ECDSA_384, ECDSA_521;
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/exception/MigrationProcessRealmNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.exception;
2 |
3 | public class MigrationProcessRealmNotFoundException extends RuntimeException{
4 | }
5 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/TriggerResultType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | public enum TriggerResultType {
4 |
5 | EVENT_SUCCESS, EVENT_FAILURE, EVENT_WARNING, EVENT_ANY_RESULT, EVENT_DISABLED
6 | }
7 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/properties/Property.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 |
4 | public interface Property {
5 |
6 | public String getValue();
7 |
8 | public String getResourceKey();
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/interfaceState/UserInterfaceStateListener.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.interfaceState;
2 |
3 |
4 | public interface UserInterfaceStateListener {
5 |
6 | void modifyState(UserInterfaceState state);
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/upgrade/core_1_DOT_2_DOT_0.postgres:
--------------------------------------------------------------------------------
1 | EXIT IF FRESH
2 | TRY
3 | ALTER TABLE local_user_groups DROP CONSTRAINT local_user_groups_uuid_key;
4 | ALTER TABLE local_group_groups DROP CONSTRAINT local_group_groups_gguid_key;
5 | CATCH
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/automation/AutomationRepeatType.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.automation;
2 |
3 | public enum AutomationRepeatType {
4 |
5 | NEVER,
6 | SECONDS,
7 | MINUTES,
8 | HOURS,
9 | DAYS;
10 |
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/MediaNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | public class MediaNotFoundException extends Exception {
4 |
5 | private static final long serialVersionUID = 3652740787254969026L;
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/jobs/InvalidJobStateException.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.jobs;
2 |
3 | public class InvalidJobStateException extends Exception {
4 |
5 | private static final long serialVersionUID = -3587601386551467161L;
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/util/Utils.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.util;
2 |
3 | public class Utils {
4 |
5 | public static String checkNull(String str) {
6 | if(str==null) {
7 | return "";
8 | }
9 | return str;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/attributes/AttributeCategory.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.attributes;
2 |
3 |
4 | public interface AttributeCategory {
5 |
6 | Long getId();
7 |
8 | String getName();
9 |
10 | Integer getWeight();
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/FallbackAuthenticationRequired.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.auth;
2 |
3 | public class FallbackAuthenticationRequired extends Exception {
4 |
5 | private static final long serialVersionUID = -2142245708294034358L;
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/repository/CriteriaConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.repository;
2 |
3 | import org.hibernate.Criteria;
4 |
5 | public interface CriteriaConfiguration {
6 |
7 | void configure(Criteria criteria);
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/scheduler/NotScheduledException.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.scheduler;
2 |
3 | public class NotScheduledException extends Exception {
4 |
5 |
6 | private static final long serialVersionUID = 7464114515074990116L;
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/TaskResultCallback.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | import com.hypersocket.tasks.TaskResult;
4 |
5 | public interface TaskResultCallback {
6 |
7 | void processResult(TaskResult result);
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/email/EmailTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.email;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface EmailTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/test/resources/test-database.properties:
--------------------------------------------------------------------------------
1 | jdbc.driver.className=org.apache.derby.jdbc.EmbeddedDriver
2 | jdbc.url=jdbc:derby:data;create=true
3 | jdbc.username=hypersocket
4 | jdbc.password=hypersocket
5 | jdbc.hibernate.dialect=com.hypersocket.derby.DefaultClobDerbyDialect
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/sleep/SleepTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.sleep;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface SleepTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/secret/SecretKeyRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.secret;
2 |
3 | import com.hypersocket.resource.AbstractResourceRepository;
4 |
5 | public interface SecretKeyRepository extends AbstractResourceRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-tests/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/java=ISO-8859-1
3 | encoding//src/main/resources=ISO-8859-1
4 | encoding//src/test/java=ISO-8859-1
5 | encoding//src/test/resources=ISO-8859-1
6 | encoding/=ISO-8859-1
7 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/UserVariableReplacement.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | public interface UserVariableReplacement extends
4 | VariableReplacement {
5 |
6 | String getVariableValue(Principal principal, String variableName);
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/command/ExecuteCommandRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.command;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface ExecuteCommandRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/ip/block/BlockIPTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.ip.block;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface BlockIPTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/ip/resolve/ResolveIPTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.ip.resolve;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface ResolveIPTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/ip/unblock/UnblockIPTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.ip.unblock;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface UnblockIPTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/suspend/ResumeUserTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.suspend;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface ResumeUserTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/suspend/SuspendUserTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.suspend;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface SuspendUserTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/session/ResourceSession.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.session;
2 |
3 | import com.hypersocket.resource.Resource;
4 |
5 | public interface ResourceSession {
6 |
7 | public void close();
8 |
9 | public T getResource();
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/ip/monitor/MonitorPortTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.ip.monitor;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface MonitorPortTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/system/SystemTriggerActionRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.system;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface SystemTriggerActionRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-tests/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
3 | org.eclipse.jdt.core.compiler.compliance=1.7
4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5 | org.eclipse.jdt.core.compiler.source=1.7
6 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/AuthenticationServiceListener.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.auth;
2 |
3 | import com.hypersocket.input.FormTemplate;
4 |
5 | public interface AuthenticationServiceListener {
6 |
7 | void modifyTemplate(AuthenticationState state, FormTemplate template);
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/context/ContextAnnotationService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.context;
2 |
3 | import org.aspectj.lang.ProceedingJoinPoint;
4 |
5 | public interface ContextAnnotationService {
6 |
7 | Object process(ProceedingJoinPoint pjp) throws Throwable;
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/JavaScriptField.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.input;
2 |
3 | public class JavaScriptField extends InputField {
4 |
5 | public JavaScriptField(String resourceKey, String script) {
6 | super(InputFieldType.script, resourceKey, script, false, "");
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/scheduler/SchedulerResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.scheduler;
2 |
3 | import com.hypersocket.resource.AbstractResourceRepository;
4 |
5 | public interface SchedulerResourceRepository extends
6 | AbstractResourceRepository {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/user/password/GeneratePasswordTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.user.password;
2 |
3 | import com.hypersocket.properties.ResourceTemplateRepository;
4 |
5 | public interface GeneratePasswordTaskRepository extends ResourceTemplateRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/annotation/AllowNameOnlyLookUp.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.annotation;
2 |
3 | import java.lang.annotation.*;
4 |
5 | @Target(ElementType.TYPE)
6 | @Retention(RetentionPolicy.RUNTIME)
7 | @Documented
8 | public @interface AllowNameOnlyLookUp {
9 | }
10 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/i18n/SystemTriggerAction.properties:
--------------------------------------------------------------------------------
1 | category.delay.label=Delay
2 |
3 | restartAction=Restart Server
4 | shutdownAction=Shutdown Server
5 | operation.delay=Delay
6 | operation.delay.info=The number of seconds to wait before executing the power operation.
7 | operation.delay.label={0} seconds
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/certificates/CertificateResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.certificates;
2 |
3 | import com.hypersocket.resource.AbstractResourceRepository;
4 |
5 |
6 | public interface CertificateResourceRepository extends
7 | AbstractResourceRepository {
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/events/EventPropertyCollector.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.events;
2 |
3 | import java.util.Set;
4 |
5 | import com.hypersocket.realm.Realm;
6 |
7 | public interface EventPropertyCollector {
8 |
9 | Set getPropertyNames(String resourceKey, Realm realm);
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/interfaces/InterfaceResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.interfaces;
2 |
3 | import com.hypersocket.resource.AbstractResourceRepository;
4 |
5 | public interface InterfaceResourceRepository extends AbstractResourceRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-netty/src/main/java/com/hypersocket/ip/IPRestrictionListener.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.ip;
2 |
3 | public interface IPRestrictionListener {
4 |
5 | void onBlockIP(String addr);
6 |
7 | void onUnblockIP(String addr);
8 |
9 | void onAllowIP(String addr);
10 |
11 | void onDisallowIP(String addr);
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/automation/AutomationResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.automation;
2 |
3 | import com.hypersocket.resource.AbstractResourceRepository;
4 |
5 |
6 | public interface AutomationResourceRepository extends
7 | AbstractResourceRepository {
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/annotation/LookUpKeys.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.annotation;
2 |
3 | import java.lang.annotation.*;
4 |
5 | @Target(ElementType.TYPE)
6 | @Retention(RetentionPolicy.RUNTIME)
7 | @Documented
8 | public @interface LookUpKeys {
9 | String[] propertyNames();
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/logoResource.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/ImgField.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.input;
2 |
3 | public class ImgField extends InputField {
4 |
5 | public ImgField() {
6 | }
7 |
8 | public ImgField(String resourceKey, String defaultValue) {
9 | super(InputFieldType.img, resourceKey, defaultValue, true, null);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/encrypt/EncryptionService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.encrypt;
2 |
3 | import org.springframework.stereotype.Service;
4 |
5 | @Service
6 | public interface EncryptionService extends Encryptor {
7 |
8 | void setEncryptor(Encryptor encryptor);
9 |
10 | Encryptor getEncryptor();
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/transactions/TransactionCallbackWithError.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.transactions;
2 |
3 | import org.springframework.transaction.support.TransactionCallback;
4 |
5 | public interface TransactionCallbackWithError extends TransactionCallback {
6 |
7 | void doTransacationError(Throwable e);
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/properties/XmlTemplatePropertyStore.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | import java.io.IOException;
4 |
5 | import org.w3c.dom.Element;
6 |
7 | public interface XmlTemplatePropertyStore extends PropertyStore {
8 |
9 | public void init(Element element) throws IOException;
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/repository/MigrationExportCriteriaBuilder.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.repository;
2 |
3 | import com.hypersocket.realm.Realm;
4 | import org.hibernate.criterion.DetachedCriteria;
5 |
6 | public interface MigrationExportCriteriaBuilder {
7 | DetachedCriteria make(Realm realm);
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/ValidationException.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | public class ValidationException extends Exception {
4 |
5 | private static final long serialVersionUID = -910054341120962980L;
6 |
7 | public ValidationException(String string) {
8 | super(string);
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/forward/url/URLForwardingResource.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.forward.url;
2 |
3 | import com.hypersocket.server.forward.ForwardingResource;
4 |
5 | public abstract class URLForwardingResource extends ForwardingResource {
6 |
7 | public abstract String getLaunchUrl();
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/DivField.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.input;
2 |
3 | public class DivField extends InputField {
4 |
5 | public DivField() {
6 | }
7 |
8 | public DivField(String resourceKey, String defaultValue) {
9 | super(InputFieldType.div, resourceKey, defaultValue, true, null);
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/upload/FileStore.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.upload;
2 |
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 |
6 | import com.hypersocket.realm.Realm;
7 |
8 | public interface FileStore {
9 |
10 | long writeFile(Realm realm, String uuid, InputStream in) throws IOException;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/interfaces/InterfaceRegistrationService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.interfaces;
2 |
3 | import java.util.Set;
4 |
5 | public interface InterfaceRegistrationService {
6 |
7 | void registerAdditionalInterface(String page);
8 |
9 | Set getAdditionalInterfacePages();
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/AuthenticationSchemeSelector.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.auth;
2 |
3 | import com.hypersocket.permissions.AccessDeniedException;
4 |
5 | public interface AuthenticationSchemeSelector {
6 | AuthenticationScheme selectScheme(String schemeResourceKey, AuthenticationState state) throws AccessDeniedException;
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/TransactionOperation.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import java.util.Map;
4 |
5 | public interface TransactionOperation {
6 |
7 | void beforeOperation(T resource, Map properties);
8 |
9 | void afterOperation(T resource, Map properties);
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/upload/FileUploadRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.upload;
2 |
3 | import com.hypersocket.resource.AbstractResourceRepository;
4 |
5 | public interface FileUploadRepository extends
6 | AbstractResourceRepository {
7 |
8 | public FileUpload getFileByUuid(String uuid);
9 |
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/forward/url/URLForwardingResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.forward.url;
2 |
3 | import com.hypersocket.resource.AbstractAssignableResourceRepository;
4 |
5 | public interface URLForwardingResourceRepository extends AbstractAssignableResourceRepository {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/annotation/HypersocketExtensionPoint.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.annotation;
2 |
3 | import org.aspectj.lang.ProceedingJoinPoint;
4 |
5 | public interface HypersocketExtensionPoint {
6 |
7 | boolean isExtending(ProceedingJoinPoint pjp);
8 |
9 | Object invoke(ProceedingJoinPoint pjp) throws Throwable;
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/RealmColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum RealmColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch(this.ordinal()) {
11 | default:
12 | return "name";
13 |
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/encryptedTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/log4j.properties:
--------------------------------------------------------------------------------
1 | # Root logger option
2 | log4j.rootLogger=INFO, stdout
3 |
4 | # Direct log messages to stdout
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | log4j.appender.stdout.Target=System.out
7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
8 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/ResourceColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum ResourceColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch(this.ordinal()) {
11 | default:
12 | return "name";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/systemTemplates.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/PrincipalColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum PrincipalColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch(this.ordinal()) {
11 | default:
12 | return "name";
13 |
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/session/SessionColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.session;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum SessionColumns implements Column {
6 |
7 | CREATEDATE;
8 |
9 | public String getColumnName() {
10 | switch (this.ordinal()) {
11 | default:
12 | return "created";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/tasks/unblockIP.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/i18n/SleepTask.properties:
--------------------------------------------------------------------------------
1 | sleepTask=Sleep
2 | sleep.result=Sleep Completed
3 | sleep.result.success=Sleep task completed successfully.
4 | sleep.result.failure=Sleep task could not complete.
5 | category.sleepTask.label=Sleep
6 | sleep.milli=Milliseconds
7 | sleep.milli.info=The number of milliseconds to sleep for.
8 |
9 | attr.sleepTime=Sleep Time (ms)
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/TriggerResourceColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum TriggerResourceColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch(this.ordinal()) {
11 | default:
12 | return "name";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/forward/ForwardingResource.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.forward;
2 |
3 | import com.hypersocket.resource.AssignableResource;
4 |
5 | public abstract class ForwardingResource extends AssignableResource {
6 |
7 | public abstract String getDestinationHostname();
8 | public abstract String getHostname();
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/tasks/resumeUser.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/attributes/user/UserAttributeCategoryRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.attributes.user;
2 |
3 | import com.hypersocket.resource.AbstractResourceRepository;
4 |
5 | public interface UserAttributeCategoryRepository extends
6 | AbstractResourceRepository {
7 |
8 | Long getMaximumCategoryWeight();
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/scheduler/SchedulerResourceColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.scheduler;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum SchedulerResourceColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch (this.ordinal()) {
11 | default:
12 | return "name";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/attributes/user/UserAttributeColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.attributes.user;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum UserAttributeColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch (this.ordinal()) {
11 | default:
12 | return "name";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/automation/AutomationResourceColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.automation;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum AutomationResourceColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch(this.ordinal()) {
11 | default:
12 | return "name";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/derby/DefaultClobDerbyDialect.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.derby;
2 |
3 | import java.sql.Types;
4 |
5 | import org.hibernate.dialect.DerbyDialect;
6 |
7 | public class DefaultClobDerbyDialect extends DerbyDialect {
8 |
9 | public DefaultClobDerbyDialect() {
10 | registerColumnType(Types.CLOB, "clob");
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/Task.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 |
6 | import com.hypersocket.resource.RealmResource;
7 |
8 | @Entity
9 | @Table(name="tasks")
10 | public abstract class Task extends RealmResource {
11 |
12 | public abstract String getResourceKey();
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/BrowserLaunchable.properties:
--------------------------------------------------------------------------------
1 | browserLaunchable.title=Browser Resources
2 | launchable.label=Browser Resources
3 | browserLaunchable.name.label=Name
4 | browserLaunchable.logo.label=Logo
5 | launchBrowserLaunchable.label=Launch
6 | browserLaunchable.delete.desc=Are you sure you want to delete the {0} resource?
7 | resource.deleted.info=The resource has been deleted.
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/roleTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/hypersocket-tests/default-conf/log4j.properties:
--------------------------------------------------------------------------------
1 | # Root logger option
2 | log4j.rootLogger=INFO, stdout
3 |
4 | # Direct log messages to stdout
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | log4j.appender.stdout.Target=System.out
7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
8 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/json/JsonRole.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.json;
2 |
3 | public class JsonRole extends JsonResource {
4 |
5 |
6 | JsonResource[] permissions;
7 |
8 | public JsonResource[] getPermissions() {
9 | return permissions;
10 | }
11 | public void setPermissions(JsonResource[] permissions) {
12 | this.permissions = permissions;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/certificates/CertificateResourceColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.certificates;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum CertificateResourceColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch(this.ordinal()) {
11 | default:
12 | return "name";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/jobs/JobResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.jobs;
2 |
3 | import java.util.Collection;
4 |
5 | import com.hypersocket.resource.AbstractResourceRepository;
6 |
7 | public interface JobResourceRepository extends
8 | AbstractResourceRepository {
9 |
10 | Collection getChildJobs(String parent);
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/tasks/resolveIPTask.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/exporter/MigrationExporter.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.exporter;
2 |
3 | import com.hypersocket.realm.Realm;
4 |
5 | import java.util.List;
6 | import java.util.Map;
7 |
8 | public interface MigrationExporter {
9 | Class getType();
10 | Map>> produceCustomOperationsMap(Realm realm);
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/TaskResult.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.events.SystemEventStatus;
5 |
6 | public interface TaskResult {
7 |
8 | boolean isPublishable();
9 |
10 | SystemEvent getEvent();
11 |
12 | boolean isSuccess();
13 |
14 | SystemEventStatus getStatus();
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/tasks/sleepTask.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/attributes/user/UserAttributeCategoryColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.attributes.user;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum UserAttributeCategoryColumns implements Column {
6 |
7 | NAME;
8 |
9 | public String getColumnName() {
10 | switch (this.ordinal()) {
11 | default:
12 | return "name";
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/repository/AbstractEntityRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.repository;
2 |
3 | import java.util.List;
4 |
5 | public interface AbstractEntityRepository extends AbstractRepository {
6 |
7 | void saveEntity(T protocol);
8 |
9 | List allEntities();
10 |
11 | T getEntityById(Long id);
12 |
13 | void deleteEntity(T entity);
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/tasks/searchResourceTask.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/PrincipalNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.auth;
2 |
3 | public class PrincipalNotFoundException extends Exception {
4 |
5 | private static final long serialVersionUID = -51106342350078872L;
6 |
7 | public PrincipalNotFoundException() {
8 |
9 | }
10 |
11 | public PrincipalNotFoundException(String msg) {
12 | super(msg);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/exception/MigrationProcessRealmAlreadyExistsThrowable.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.exception;
2 |
3 | /**
4 | * Extending to Throwable as a hack, as logic where this is thrown we already catch Exception.
5 | * Need to escape it, hence going a level up in hierarchy.
6 | */
7 | public class MigrationProcessRealmAlreadyExistsThrowable extends Throwable{
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/service/ServiceManagementService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.service;
2 |
3 | import java.util.Collection;
4 |
5 | import com.hypersocket.auth.AuthenticatedService;
6 |
7 | public interface ServiceManagementService extends AuthenticatedService {
8 |
9 | void registerService(ManageableService service);
10 |
11 | Collection getServices();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/UserInterfaceStateService.properties:
--------------------------------------------------------------------------------
1 | userInterfaceState.updated.info=User Interface State Updated {0}
2 | userInterfaceState.created.info=User Interface State Created {0}
3 |
4 | userInterfaceState.delete=User Interface State Delete
5 | userInterfaceState.update=User Interface State Update
6 | userInterfaceState.create=User Interface State Create
7 | userInterfaceState.read=User Interface State Read
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/context/SystemContextRequired.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.context;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Retention(RetentionPolicy.RUNTIME)
9 | @Target(ElementType.METHOD)
10 | public @interface SystemContextRequired {
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/PasswordEnabledAuthenticatedService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.auth;
2 |
3 | import com.hypersocket.session.Session;
4 |
5 | public interface PasswordEnabledAuthenticatedService extends AuthenticatedService {
6 |
7 | String getCurrentPassword();
8 |
9 | void setCurrentPassword(String password);
10 |
11 | void setCurrentPassword(Session session, String password);
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/json/JsonMapper.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.json;
2 |
3 | import com.fasterxml.jackson.databind.ObjectMapper;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | public class JsonMapper {
8 |
9 | public final ObjectMapper objectMapper = new ObjectMapper();
10 |
11 | public ObjectMapper get() {
12 | return objectMapper;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/ResourceImportException.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | public class ResourceImportException extends ResourceException {
4 |
5 | private static final long serialVersionUID = -2312394108081531142L;
6 |
7 | public ResourceImportException(String bundle, String resourceKey,
8 | Object... args) {
9 | super(bundle, resourceKey, args);
10 | }
11 |
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/hypersocket-inbox/src/main/java/com/hypersocket/inbox/EmailProcessor.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.inbox;
2 |
3 | import java.util.Date;
4 |
5 | import javax.mail.Address;
6 |
7 | public interface EmailProcessor {
8 |
9 | void processEmail(Address[] from, Address[] replyTo, Address[] to, Address[] cc, String subject, String textContent,
10 | String htmlContent, Date sent, Date received, EmailAttachment... attachments);
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/notify/NotificationProvider.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.notify;
2 |
3 | import java.util.List;
4 | import java.util.Locale;
5 |
6 | import com.hypersocket.session.Session;
7 |
8 | public interface NotificationProvider {
9 |
10 | List getNotifications(Session session, Locale locale, String context);
11 |
12 | boolean hasNotifications(Session session, String context);
13 | }
14 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/PropertyEntity.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Retention(RetentionPolicy.RUNTIME)
9 | @Target(ElementType.METHOD)
10 | public @interface PropertyEntity {
11 | Class> clz();
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/localRealmTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/forward/url/URLForwardingResourceService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.forward.url;
2 |
3 | import com.hypersocket.resource.AbstractAssignableResourceService;
4 | import com.hypersocket.server.forward.ForwardingService;
5 |
6 | public interface URLForwardingResourceService extends AbstractAssignableResourceService, ForwardingService {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/annotation/Order.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.annotation;
2 |
3 | import java.lang.annotation.*;
4 |
5 | @Target(ElementType.TYPE)
6 | @Retention(RetentionPolicy.RUNTIME)
7 | @Documented
8 | public @interface Order {
9 | enum Direction {ASC, DESC}
10 |
11 | Direction direction() default Direction.ASC;
12 |
13 | String property() default "created";
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/importer/MigrationImporter.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.importer;
2 |
3 | import com.fasterxml.jackson.databind.JsonNode;
4 | import com.hypersocket.realm.Realm;
5 |
6 | public interface MigrationImporter {
7 | void process(E entity);
8 | void postSave(E entity);
9 | Class getType();
10 | void processCustomOperationsMap(JsonNode jsonNode, Realm realm);
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tables/ColumnSort.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tables;
2 |
3 |
4 | public class ColumnSort {
5 |
6 | Column column;
7 | Sort sort;
8 |
9 | public ColumnSort(Column col, Sort sort) {
10 | this.column = col;
11 | this.sort = sort;
12 | }
13 |
14 | public Column getColumn() {
15 | return column;
16 | }
17 |
18 | public Sort getSort() {
19 | return sort;
20 | }
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/tasks/systemRestart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/TriggerConditionProvider.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 |
5 | public interface TriggerConditionProvider {
6 |
7 | String getResourceBundle();
8 |
9 | String[] getResourceKeys();
10 |
11 | boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/ClientConnector.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server;
2 |
3 | import java.net.InetSocketAddress;
4 |
5 | import com.hypersocket.server.websocket.WebsocketClientCallback;
6 |
7 | public interface ClientConnector {
8 |
9 | Integer getWeight();
10 |
11 | boolean handlesConnect(InetSocketAddress addr);
12 |
13 | void connect(InetSocketAddress addr, WebsocketClientCallback callback);
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/upload/FileUploadColumn.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.upload;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum FileUploadColumn implements Column {
6 |
7 | NAME, FILESIZE, TYPE;
8 |
9 | public String getColumnName() {
10 | switch (this.ordinal()) {
11 | case 1:
12 | return "fileSize";
13 | case 2:
14 | return "type";
15 | default:
16 | return "fileName";
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/interfaces/http/HTTPInterfaceResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.interfaces.http;
2 |
3 | import java.util.Collection;
4 |
5 | import com.hypersocket.resource.AbstractResourceRepository;
6 |
7 | public interface HTTPInterfaceResourceRepository extends
8 | AbstractResourceRepository {
9 |
10 | Collection allInterfaces();
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/config/ConfigurationRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.config;
2 |
3 | import java.util.Map;
4 |
5 | import com.hypersocket.properties.ResourceTemplateRepository;
6 | import com.hypersocket.resource.AbstractResource;
7 |
8 | public interface ConfigurationRepository extends ResourceTemplateRepository {
9 |
10 | void setValues(AbstractResource resource, Map values);
11 |
12 |
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/encrypt/Encryptor.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.encrypt;
2 |
3 | import java.io.IOException;
4 |
5 | import com.hypersocket.realm.Realm;
6 |
7 | public interface Encryptor {
8 |
9 | String decryptString(String reference, String data, Realm realm) throws IOException;
10 |
11 | String encryptString(String reference, String data, Realm realm)
12 | throws IOException;
13 |
14 | String getProviderName();
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/browser/BrowserLaunchableColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.browser;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum BrowserLaunchableColumns implements Column {
6 |
7 | NAME, LOGO, TYPE;
8 |
9 | public String getColumnName() {
10 | switch(this.ordinal()) {
11 | case 2:
12 | return "type";
13 | case 1:
14 | return "logo";
15 | default:
16 | return "name";
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/events/AbstractEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.events;
2 |
3 | import org.springframework.context.ApplicationEvent;
4 |
5 | public class AbstractEvent extends ApplicationEvent {
6 |
7 | private static final long serialVersionUID = -8962107614397284343L;
8 |
9 | public AbstractEvent(Object source) {
10 | super(source);
11 | }
12 |
13 | public String[] getResourceKeys() {
14 | return new String[] { };
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/handlers/impl/ContentFilter.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.handlers.impl;
2 |
3 | import java.io.InputStream;
4 |
5 | import javax.servlet.http.HttpServletRequest;
6 |
7 | public interface ContentFilter {
8 |
9 | InputStream getFilterStream(InputStream resourceStream, HttpServletRequest request) throws RedirectException;
10 |
11 | boolean filtersPath(String path);
12 |
13 | Integer getWeight();
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/customized/MigrationCustomExport.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.customized;
2 |
3 | import java.util.Set;
4 | import java.util.zip.ZipOutputStream;
5 |
6 | import com.hypersocket.realm.Realm;
7 |
8 | public interface MigrationCustomExport {
9 |
10 | boolean include(Set entities);
11 | Class getType();
12 | Short sortOrder();
13 | void export(Realm realm, ZipOutputStream zipOutputStream);
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/realmTemplate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/i18n/ResolveIPTask.properties:
--------------------------------------------------------------------------------
1 | resolveIPTask=Resolve IP Address
2 | resolveIP.result=Resolve IP Completed
3 | resolveIP.result.success=The Resolve IP task completed successfully.
4 | resolveIP.result.failure=The Resolve IP task could not complete.
5 | category.resolveIPTask.label=Resolve
6 | resolveIP.hostnames=Hostnames
7 | resolveIP.hostnames.info=The hostnames that you want to resolve the IP for.
8 |
9 | attr.hostnames=Hostnames
10 | attr.ips=IP Addresses
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/mixin/entity/RealmMigrationMixIn.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.mixin.entity;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import com.hypersocket.migration.mixin.MigrationMixIn;
5 | import com.hypersocket.realm.Realm;
6 |
7 | @JsonIgnoreProperties(ignoreUnknown = true)
8 | public class RealmMigrationMixIn extends Realm implements MigrationMixIn {
9 |
10 | private RealmMigrationMixIn() {}
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/i18n/SuspendUserTask.properties:
--------------------------------------------------------------------------------
1 | category.suspendUser.label=Suspend User
2 | suspendUser=Suspend User
3 | suspendUser.result=Suspended User
4 | suspendUser.minutes={0} minutes
5 | suspendUser.name=Username
6 | suspendUser.name.info=The username of the user to suspend.
7 |
8 | resumeUser=Resume User
9 | resumeUser.result=Resumed User
10 | category.resumeUser.label=ResumeUser
11 | resumeUser.name=Username
12 | resumeUser.name.info=The username of the user to resume.
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/jobs/JobResourceColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.jobs;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum JobResourceColumns implements Column {
6 |
7 | NAME;
8 |
9 | /**
10 | * TODO rename this class and add any additional columns you
11 | * need to display in the resource table.
12 | */
13 | public String getColumnName() {
14 | switch(this.ordinal()) {
15 | default:
16 | return "name";
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/repository/MigrationLookupCriteriaBuilder.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.repository;
2 |
3 | import com.fasterxml.jackson.databind.JsonNode;
4 | import com.hypersocket.migration.lookup.LookUpKey;
5 | import com.hypersocket.realm.Realm;
6 | import org.hibernate.criterion.DetachedCriteria;
7 |
8 | public interface MigrationLookupCriteriaBuilder {
9 | DetachedCriteria make(Realm realm, LookUpKey lookUpKey, JsonNode node);
10 | }
11 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/exporter/JsonPropertiesAdder.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.exporter;
2 |
3 | import com.fasterxml.jackson.core.JsonGenerator;
4 | import com.fasterxml.jackson.databind.SerializerProvider;
5 | import com.hypersocket.repository.AbstractEntity;
6 |
7 | import java.io.IOException;
8 |
9 | public interface JsonPropertiesAdder {
10 | void add(AbstractEntity value, JsonGenerator gen, SerializerProvider provider) throws IOException;
11 | }
12 |
--------------------------------------------------------------------------------
/hypersocket-netty/src/main/java/com/hypersocket/netty/forwarding/NettyWebsocketClient.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.netty.forwarding;
2 |
3 | import org.jboss.netty.channel.Channel;
4 | import org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame;
5 |
6 | import com.hypersocket.server.websocket.WebsocketClient;
7 |
8 | public interface NettyWebsocketClient extends WebsocketClient {
9 |
10 | void setWebsocketChannel(Channel channel);
11 |
12 | void frameReceived(WebSocketFrame msg);
13 | }
14 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/sleep/SleepTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.sleep;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
6 |
7 | public class SleepTaskRepositoryImpl extends
8 | ResourceTemplateRepositoryImpl implements SleepTaskRepository {
9 |
10 | @PostConstruct
11 | private void postConstruct() {
12 | loadPropertyTemplates("tasks/sleepTask.xml");
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/message/MessageResourceColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.message;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum MessageResourceColumns implements Column {
6 |
7 | NAME;
8 |
9 | /**
10 | * TODO rename this class and add any additional columns you
11 | * need to display in the resource table.
12 | */
13 | public String getColumnName() {
14 | switch(this.ordinal()) {
15 | default:
16 | return "name";
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/tasks/executeCommand.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
10 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/tables/BootstrapTableResourceProcessor.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tables;
2 |
3 | import java.io.FileNotFoundException;
4 | import java.io.IOException;
5 |
6 | import com.hypersocket.permissions.AccessDeniedException;
7 | import com.hypersocket.tables.json.BootstrapTablePageProcessor;
8 |
9 | public interface BootstrapTableResourceProcessor extends BootstrapTablePageProcessor {
10 |
11 | T getResource() throws AccessDeniedException, IOException;
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/TransactionAdapter.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import java.util.Map;
4 |
5 | public class TransactionAdapter implements TransactionOperation {
6 |
7 | public TransactionAdapter() {
8 | }
9 |
10 | @Override
11 | public void beforeOperation(T resource, Map properties) {
12 |
13 | }
14 |
15 | @Override
16 | public void afterOperation(T resource, Map properties) {
17 |
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/ResourceExportException.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | public class ResourceExportException extends ResourceException {
4 |
5 | private static final long serialVersionUID = 7392054503444814524L;
6 |
7 | public ResourceExportException(String bundle, String resourceKey,
8 | Object... args) {
9 | super(bundle, resourceKey, args);
10 | }
11 |
12 | public ResourceExportException(ResourceException e) {
13 | super(e);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/service/ManageableService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.service;
2 |
3 | import com.fasterxml.jackson.databind.annotation.JsonSerialize;
4 |
5 | @JsonSerialize(as=ManageableService.class)
6 | public interface ManageableService {
7 |
8 | void stop();
9 |
10 | boolean start();
11 |
12 | String getResourceKey();
13 |
14 | String getResourceBundle();
15 |
16 | boolean isRunning();
17 |
18 | boolean isError();
19 |
20 | String getErrorText();
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/alert/AlertTaskRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.alert;
2 |
3 | import java.util.Date;
4 |
5 | import com.hypersocket.properties.ResourceTemplateRepository;
6 | import com.hypersocket.tasks.Task;
7 |
8 | public interface AlertTaskRepository extends
9 | ResourceTemplateRepository {
10 |
11 | long getKeyCount(Task task, String key, Date since);
12 |
13 | void saveKey(AlertKey ak);
14 |
15 | void deleteKeys(Task task, String key);
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/I18NService.properties:
--------------------------------------------------------------------------------
1 | #Properties
2 | category.localization.label=Localization
3 |
4 | current.locale=Locale
5 | current.locale.info=The default locale for this server.
6 |
7 | user.locales=User Locales
8 | user.locales.info=Allow a user to select their own Locale at login.
9 |
10 | en=English
11 | da=Danish
12 | nl=Dutch
13 | fi=Finnish
14 | fr=French
15 | de=German
16 | it=Italian
17 | no=Norwegian
18 | pl=Polish
19 | ru=Russian
20 | sv=Swedish
21 | es=Spanish
22 | ja=Japanese
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/properties/PropertyStore.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 |
4 | public interface PropertyStore {
5 |
6 | public String getPropertyValue(PropertyTemplate template);
7 |
8 | public void setProperty(PropertyTemplate property, String value);
9 |
10 | public void registerTemplate(PropertyTemplate template, String module);
11 |
12 | public PropertyTemplate getPropertyTemplate(String resourceKey);
13 |
14 | public boolean isDefaultStore();
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/customized/MigrationCustomImport.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.customized;
2 |
3 | import java.util.zip.ZipInputStream;
4 |
5 | import com.hypersocket.migration.execution.MigrationExecutorTracker;
6 | import com.hypersocket.realm.Realm;
7 |
8 | public interface MigrationCustomImport {
9 |
10 | Class getType();
11 | void _import(String fileName, Realm realm, ZipInputStream zipInputStream, MigrationExecutorTracker migrationExecutorTracker);
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/command/ExecuteCommandRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.command;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
6 |
7 | public class ExecuteCommandRepositoryImpl extends
8 | ResourceTemplateRepositoryImpl implements ExecuteCommandRepository {
9 |
10 | @PostConstruct
11 | private void postConstruct() {
12 | loadPropertyTemplates("tasks/executeCommand.xml");
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/message/MessageResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.message;
2 |
3 | import java.util.Collection;
4 |
5 | import com.hypersocket.realm.Realm;
6 | import com.hypersocket.resource.AbstractResourceRepository;
7 |
8 | public interface MessageResourceRepository extends
9 | AbstractResourceRepository {
10 |
11 | Collection getMessagesByEvent(String className);
12 |
13 | MessageResource getMessageById(Integer id, Realm realm);
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/ImageProperty.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | public class ImageProperty implements Property {
4 |
5 | String resourceKey;
6 | String value;
7 | ImageProperty(String resourceKey, String value) {
8 | this.resourceKey = resourceKey;
9 | this.value = value;
10 | }
11 |
12 | @Override
13 | public String getValue() {
14 | return value;
15 | }
16 |
17 | @Override
18 | public String getResourceKey() {
19 | return resourceKey;
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/ip/resolve/ResolveIPTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.ip.resolve;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
6 |
7 | public class ResolveIPTaskRepositoryImpl extends
8 | ResourceTemplateRepositoryImpl implements ResolveIPTaskRepository {
9 |
10 | @PostConstruct
11 | private void postConstruct() {
12 | loadPropertyTemplates("tasks/resolveIPTask.xml");
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/dashboard/message/DashboardMessageService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.dashboard.message;
2 |
3 | import java.util.List;
4 |
5 | public interface DashboardMessageService {
6 |
7 | List getMessages();
8 |
9 | List getUnexpiredMessages(int pageNum);
10 |
11 | void saveNewMessages(DashboardMessage[] dashboardMessageList);
12 |
13 | DashboardMessage saveNewMessage(DashboardMessage dashboardMessage);
14 |
15 | Long getMessageCount();
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/system/SystemTriggerActionRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.system;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
6 |
7 | public class SystemTriggerActionRepositoryImpl extends
8 | ResourceTemplateRepositoryImpl implements SystemTriggerActionRepository {
9 |
10 | @PostConstruct
11 | private void postConstruct() {
12 | loadPropertyTemplates("tasks/systemRestart.xml");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/DatabasePropertyStoreFactoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Component;
5 |
6 | import com.hypersocket.config.SystemConfigurationRepository;
7 |
8 | @Component
9 | public class DatabasePropertyStoreFactoryImpl implements DatabasePropertyStoreFactory {
10 |
11 | @Autowired
12 | SystemConfigurationRepository systemConfigurationRepository;
13 |
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/secret/SecretKeyRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.secret;
2 |
3 | import org.springframework.stereotype.Repository;
4 |
5 | import com.hypersocket.resource.AbstractResourceRepositoryImpl;
6 |
7 | @Repository
8 | public class SecretKeyRepositoryImpl extends AbstractResourceRepositoryImpl implements SecretKeyRepository {
9 |
10 | @Override
11 | protected Class getResourceClass() {
12 | return SecretKeyResource.class;
13 | }
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/tasks/blockIP.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
10 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/TaskProviderService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks;
2 |
3 | import java.util.List;
4 |
5 | import com.hypersocket.auth.AuthenticatedService;
6 |
7 | public interface TaskProviderService extends AuthenticatedService {
8 |
9 | TaskProvider getTaskProvider(String resourceKey);
10 |
11 | void registerTaskProvider(TaskProvider action);
12 |
13 | TaskProvider getTaskProvider(Task task);
14 |
15 | List getTriggerTasks();
16 |
17 | List getAutomationTasks();
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/TriggerExecutor.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | import com.hypersocket.auth.AuthenticatedService;
4 | import com.hypersocket.events.SystemEvent;
5 |
6 | public interface TriggerExecutor extends AuthenticatedService {
7 |
8 | void processEventTrigger(TriggerResource trigger, SystemEvent result, SystemEvent sourceEvent) throws ValidationException;
9 |
10 | void scheduleOrExecuteTrigger(TriggerResource trigger, SystemEvent sourceEvent) throws ValidationException;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-netty/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | TestServlet
8 | com.hypersocket.servlet.TestServlet
9 |
10 |
11 |
12 | TestServlet
13 | /test
14 |
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/reconcile/AbstractReconcileService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.reconcile;
2 |
3 | import org.quartz.SchedulerException;
4 |
5 | import com.hypersocket.resource.Resource;
6 |
7 | public interface AbstractReconcileService {
8 |
9 | boolean reconcileNow(T resource);
10 |
11 | void updateResourceSchedule(T resource) throws SchedulerException;
12 |
13 | void unlockResource(T resource);
14 |
15 | void lockResource(T resource);
16 |
17 | boolean isLocked(T resource);
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/email/EmailTrackerRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.email;
2 |
3 | import com.hypersocket.realm.Principal;
4 | import com.hypersocket.realm.Realm;
5 | import com.hypersocket.repository.AbstractRepository;
6 |
7 | public interface EmailTrackerRepository extends AbstractRepository {
8 |
9 | EmailReceipt trackEmail(String subject, String emailAddress, Realm realm, Principal principal);
10 |
11 | EmailReceipt getReceiptById(Long id);
12 |
13 | void saveReceipt(EmailReceipt receipt);
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/interfaces/http/HTTPInterfaceResourceColumns.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.interfaces.http;
2 |
3 | import com.hypersocket.tables.Column;
4 |
5 | public enum HTTPInterfaceResourceColumns implements Column {
6 |
7 | NAME;
8 |
9 | /**
10 | * TODO rename this class and add any additional columns you
11 | * need to display in the resource table.
12 | */
13 | public String getColumnName() {
14 | switch(this.ordinal()) {
15 | default:
16 | return "name";
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/notify/NotificationService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.notify;
2 |
3 | import java.util.List;
4 |
5 | import com.hypersocket.auth.AuthenticatedService;
6 |
7 | public interface NotificationService extends AuthenticatedService {
8 |
9 | public final static String RESOURCE_BUNDLE = "NotificationService";
10 |
11 | List getNotifications(String context);
12 |
13 | void registerProvider(NotificationProvider provider);
14 |
15 | void unregisterProvider(NotificationProvider provider);
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/user/password/GeneratePasswordTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.user.password;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
6 |
7 | public class GeneratePasswordTaskRepositoryImpl extends
8 | ResourceTemplateRepositoryImpl implements GeneratePasswordTaskRepository {
9 |
10 | @PostConstruct
11 | private void postConstruct() {
12 | loadPropertyTemplates("tasks/generatePasswordTask.xml");
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/json/JsonResource.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.json;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 |
5 | @JsonIgnoreProperties(ignoreUnknown=true)
6 | public class JsonResource {
7 |
8 | Long id;
9 | String name;
10 |
11 | public Long getId() {
12 | return id;
13 | }
14 | public void setId(Long id) {
15 | this.id = id;
16 | }
17 | public String getName() {
18 | return name;
19 | }
20 | public void setName(String name) {
21 | this.name = name;
22 | }
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/AbstractResource.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import com.hypersocket.repository.AbstractEntity;
4 |
5 | import javax.persistence.*;
6 |
7 | @MappedSuperclass
8 | public abstract class AbstractResource extends AbstractEntity {
9 |
10 | @Id
11 | @GeneratedValue(strategy = GenerationType.TABLE)
12 | @Column(name="resource_id")
13 | Long id;
14 |
15 | public Long getId() {
16 | return id;
17 | }
18 |
19 | public void setId(Long id) {
20 | this.id = id;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/browser/BrowserLaunchable.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.browser;
2 |
3 | import java.util.Set;
4 |
5 | import com.hypersocket.permissions.Role;
6 | import com.hypersocket.realm.Realm;
7 |
8 | public interface BrowserLaunchable {
9 |
10 | String getName();
11 |
12 | Realm getRealm();
13 |
14 | String getLaunchUrl();
15 |
16 | Set getRoles();
17 |
18 | String getLogo();
19 |
20 | String getType();
21 |
22 | boolean isDisplayInBrowserResourcesTable();
23 |
24 | Boolean getRequireVPNAccess();
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/Condition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public interface Condition {
9 |
10 | boolean checkCondition(TriggerCondition condition,
11 | TriggerResource trigger,
12 | SystemEvent event) throws ValidationException;
13 |
14 | boolean isValueRequired();
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/EventService.properties:
--------------------------------------------------------------------------------
1 | resource.event=Resource Event
2 | assignable.event=Assignable Resource Event
3 |
4 | attr.exception=Error
5 | attr.ipAddress=IP Address
6 | attr.principalRealm=Realm
7 | attr.principalName=Current User
8 | attr.principalDesc=User Description
9 | attr.uuid=Session ID
10 | attr.resourceId=Resource ID
11 | attr.resourceName=Resource Name
12 | attr.oldResourceName=Previous Name
13 | attr.realmName=Resource Realm
14 | attr.roles=Roles
15 | attr.taskName=Task
16 | attr.created=Created
17 | attr.lastModified=Last Modified
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/tasks/suspendUser.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/scheduler/SchedulerResourceRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.scheduler;
2 |
3 | import org.springframework.stereotype.Repository;
4 |
5 | import com.hypersocket.resource.AbstractResourceRepositoryImpl;
6 |
7 | @Repository
8 | public class SchedulerResourceRepositoryImpl extends
9 | AbstractResourceRepositoryImpl implements
10 | SchedulerResourceRepository {
11 |
12 | @Override
13 | protected Class getResourceClass() {
14 | return SchedulerResource.class;
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/utils/StaticResolver.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.utils;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 |
6 | public class StaticResolver implements ITokenResolver {
7 |
8 | Map tokens = new HashMap();
9 | public StaticResolver() {
10 |
11 | }
12 |
13 | protected void addToken(String name, String value) {
14 | tokens.put(name, value);
15 | }
16 |
17 | @Override
18 | public final String resolveToken(String tokenName) {
19 | return tokens.get(tokenName);
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/tasks/email/EmailTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.email;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import org.springframework.stereotype.Repository;
6 |
7 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
8 |
9 | @Repository
10 | public class EmailTaskRepositoryImpl extends ResourceTemplateRepositoryImpl
11 | implements EmailTaskRepository {
12 |
13 |
14 | @PostConstruct
15 | private void postConstruct() {
16 | loadPropertyTemplates("tasks/sendEmail.xml");
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/config/SystemConfigurationRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.config;
2 |
3 | import java.util.Map;
4 |
5 | import com.hypersocket.properties.PropertyRepository;
6 | import com.hypersocket.properties.PropertyTemplate;
7 | import com.hypersocket.properties.PropertyTemplateRepository;
8 |
9 | public interface SystemConfigurationRepository extends PropertyTemplateRepository, PropertyRepository {
10 |
11 | void setValues(Map values);
12 |
13 | PropertyTemplate getPropertyTemplate(String resourceKey);
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/RealmListener.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | import com.hypersocket.resource.ResourceChangeException;
4 | import com.hypersocket.resource.ResourceCreationException;
5 |
6 | public interface RealmListener {
7 |
8 | public boolean hasCreatedDefaultResources(Realm realm);
9 |
10 | public void onCreateRealm(Realm realm) throws ResourceCreationException;
11 |
12 | public void onUpdateRealm(Realm realm) throws ResourceChangeException;
13 |
14 | public void onDeleteRealm(Realm realm) throws ResourceChangeException;
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/tasks/retryTask.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/ip/block/BlockIPTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.ip.block;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import org.springframework.stereotype.Repository;
6 |
7 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
8 |
9 | @Repository
10 | public class BlockIPTaskRepositoryImpl extends
11 | ResourceTemplateRepositoryImpl implements BlockIPTaskRepository {
12 |
13 | @PostConstruct
14 | private void postConstruct() {
15 | loadPropertyTemplates("tasks/blockIP.xml");
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/certificates/CertificateResourceRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.certificates;
2 |
3 | import org.springframework.stereotype.Repository;
4 |
5 | import com.hypersocket.resource.AbstractResourceRepositoryImpl;
6 |
7 | @Repository
8 | public class CertificateResourceRepositoryImpl extends
9 | AbstractResourceRepositoryImpl implements
10 | CertificateResourceRepository {
11 |
12 | @Override
13 | protected Class getResourceClass() {
14 | return CertificateResource.class;
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-core/src/test/java/com/hypersocket/tests/ContextLoadingTest.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 |
6 | import org.apache.commons.io.FileUtils;
7 | import org.junit.BeforeClass;
8 | import org.springframework.test.context.ContextConfiguration;
9 |
10 | @ContextConfiguration(locations = { "/test-applicationContext.xml" })
11 | public class ContextLoadingTest {
12 |
13 | @BeforeClass
14 | public static void before() throws IOException {
15 | File data = new File("data");
16 | FileUtils.deleteDirectory(data);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/ip/unblock/UnblockIPTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.ip.unblock;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import org.springframework.stereotype.Repository;
6 |
7 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
8 |
9 | @Repository
10 | public class UnblockIPTaskRepositoryImpl extends
11 | ResourceTemplateRepositoryImpl implements UnblockIPTaskRepository {
12 |
13 | @PostConstruct
14 | private void postConstruct() {
15 | loadPropertyTemplates("tasks/unblockIP.xml");
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/suspend/ResumeUserTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.suspend;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import org.springframework.stereotype.Repository;
6 |
7 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
8 |
9 | @Repository
10 | public class ResumeUserTaskRepositoryImpl extends
11 | ResourceTemplateRepositoryImpl implements ResumeUserTaskRepository {
12 |
13 | @PostConstruct
14 | private void postConstruct() {
15 | loadPropertyTemplates("tasks/resumeUser.xml");
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/transactions/TransactionService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.transactions;
2 |
3 | import org.springframework.transaction.support.TransactionCallback;
4 |
5 | import com.hypersocket.permissions.AccessDeniedException;
6 | import com.hypersocket.resource.ResourceException;
7 |
8 | public interface TransactionService {
9 |
10 | T doInTransaction(TransactionCallback transaction)
11 | throws ResourceException, AccessDeniedException;
12 |
13 | T doInTransaction(TransactionCallbackWithError transaction) throws ResourceException;
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/ip/monitor/MonitorPortTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.ip.monitor;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import org.springframework.stereotype.Repository;
6 |
7 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
8 |
9 | @Repository
10 | public class MonitorPortTaskRepositoryImpl extends
11 | ResourceTemplateRepositoryImpl implements MonitorPortTaskRepository {
12 |
13 | @PostConstruct
14 | private void postConstruct() {
15 | loadPropertyTemplates("tasks/monitorPort.xml");
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/java/com/hypersocket/tasks/suspend/SuspendUserTaskRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tasks.suspend;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import org.springframework.stereotype.Repository;
6 |
7 | import com.hypersocket.properties.ResourceTemplateRepositoryImpl;
8 |
9 | @Repository
10 | public class SuspendUserTaskRepositoryImpl extends
11 | ResourceTemplateRepositoryImpl implements SuspendUserTaskRepository {
12 |
13 | @PostConstruct
14 | private void postConstruct() {
15 | loadPropertyTemplates("tasks/suspendUser.xml");
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/resources/i18n/URLForwardingResourceService.properties:
--------------------------------------------------------------------------------
1 | url.sessionOpened=URL Opened
2 | url.sessionOpened.success={attr.principalName} opened the URL {attr.resourceName}.
3 | url.sessionOpened.failure={attr.principalName} failed to open the URL {attr.resourceName}.
4 |
5 | url.sessionClosed=URL Closed
6 | url.sessionClosed.success={attr.principalName} closed the URL {attr.resourceName}.
7 | url.sessionClosed.failure={attr.principalName} failed to close the URL {attr.resourceName}.
8 |
9 | attr.totalBytesIn=Bytes In
10 | attr.totalBytesOut=Bytes Out
11 | attr.url=URL
12 | attr.launchUrl=Launch URL
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/InvalidAuthenticationContext.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.auth;
2 |
3 | public class InvalidAuthenticationContext extends RuntimeException {
4 |
5 | private static final long serialVersionUID = 8089721650943141494L;
6 |
7 | public InvalidAuthenticationContext() {
8 | }
9 |
10 | public InvalidAuthenticationContext(String arg0) {
11 | super(arg0);
12 | }
13 |
14 | public InvalidAuthenticationContext(Throwable arg0) {
15 | super(arg0);
16 | }
17 |
18 | public InvalidAuthenticationContext(String arg0, Throwable arg1) {
19 | super(arg0, arg1);
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/PrincipalRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | import java.util.List;
4 |
5 | import com.hypersocket.resource.AbstractResourceRepository;
6 | import com.hypersocket.tables.ColumnSort;
7 |
8 | public interface PrincipalRepository extends AbstractResourceRepository {
9 |
10 | List search(Realm realm, PrincipalType type, String searchColumn, String searchPattern, int start,
11 | int length, ColumnSort[] sorting);
12 |
13 | long getResourceCount(Realm realm, PrincipalType type, String searchColumn, String searchPattern);
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/AssignableResourceService.properties:
--------------------------------------------------------------------------------
1 | generic.create.error=Failed to create resource. {0}
2 | generic.update.error=Failed to update resource. {0}
3 | generic.delete.error=Failed to delete resource. {0}
4 | generic.alreadyExists.error=A resource with the name {0} already exists!
5 |
6 | error.nothingToExport=There is nothing to export!
7 | error.importError=There was a problem importing your resources. {0}
8 | error.exportError=There was a problem exporting your resources. {0}
9 |
10 | error.invalidResourceName={0} is an invalid name.
11 | error.invalidResourceId={0} is not a valid resource id.
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/email/EmailTrackerService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.email;
2 |
3 | import com.hypersocket.permissions.AccessDeniedException;
4 | import com.hypersocket.realm.Realm;
5 | import com.hypersocket.resource.ResourceNotFoundException;
6 |
7 | public interface EmailTrackerService {
8 |
9 | void finaliseReceipt(Long receiptId);
10 |
11 | String generateTrackingUri(String subject, String name, String emailAddress, Realm realm) throws AccessDeniedException;
12 |
13 | String generateNonTrackingUri(String uuid, Realm realm) throws AccessDeniedException, ResourceNotFoundException;
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/forward/url/URLForwardingResourceRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.forward.url;
2 |
3 | import org.springframework.stereotype.Repository;
4 |
5 | import com.hypersocket.resource.AbstractAssignableResourceRepositoryImpl;
6 |
7 | @Repository
8 | public class URLForwardingResourceRepositoryImpl extends AbstractAssignableResourceRepositoryImpl
9 | implements URLForwardingResourceRepository {
10 |
11 | @Override
12 | protected Class getResourceClass() {
13 | return URLForwardingResource.class;
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/constraint/ConstraintAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.constraint;
9 |
10 | public enum ConstraintAction {
11 |
12 | ALLOW,
13 | DENY
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/constraint/ConstraintType.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.constraint;
9 |
10 | public enum ConstraintType {
11 |
12 | IP,
13 | USER_AGENT;
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/test/java/com/hypersocket/tests/ExampleTest.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
7 |
8 | import com.hypersocket.config.ConfigurationService;
9 |
10 | @RunWith(SpringJUnit4ClassRunner.class)
11 | public class ExampleTest extends ContextLoadingTest {
12 |
13 | @Autowired
14 | ConfigurationService configurationService;
15 |
16 | @Test
17 | public void example() {
18 | configurationService.clearPrincipalContext();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-inbox/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | hypersocket-inbox
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.m2e.core.maven2Nature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/hypersocket-netty/src/main/java/com/hypersocket/netty/Request.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.netty;
2 |
3 | import javax.servlet.http.HttpServletRequest;
4 |
5 | public class Request {
6 |
7 | static ThreadLocal threadRequests = new ThreadLocal();
8 |
9 | static void set(HttpServletRequest request) {
10 | threadRequests.set(request);
11 | }
12 |
13 | public static HttpServletRequest get() {
14 | return threadRequests.get();
15 | }
16 |
17 | public static boolean isAvailable() {
18 | return threadRequests.get()!=null;
19 | }
20 |
21 | static void remove() {
22 | threadRequests.remove();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/encrypt/EncryptionProvider.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.encrypt;
2 |
3 | import java.io.IOException;
4 | import java.security.Provider;
5 |
6 | import javax.crypto.SecretKey;
7 |
8 |
9 |
10 | public interface EncryptionProvider {
11 |
12 | String encrypt(String toEncrypt) throws Exception;
13 |
14 | String decrypt(String toDecrypt) throws Exception;
15 |
16 | boolean supportsSecretKeyStorage();
17 |
18 | void createSecretKey(String reference) throws IOException;
19 |
20 | SecretKey getSecretKey(String reference) throws IOException;
21 |
22 | Provider getProvider();
23 |
24 | String getName();
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/InputFieldType.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.input;
9 |
10 | public enum InputFieldType {
11 | text, password, select, hidden, p, a, script, div, img;
12 | }
13 |
--------------------------------------------------------------------------------
/hypersocket-templates/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | hypersocket-templates
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.m2e.core.maven2Nature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/permissions/PermissionStrategy.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.permissions;
9 |
10 | public enum PermissionStrategy {
11 |
12 | INCLUDE_IMPLIED,
13 | EXCLUDE_IMPLIED;
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/OverviewWidgetService.properties:
--------------------------------------------------------------------------------
1 | overview.systemMessages.title=MESSAGES
2 | overview.featureReel.title=FEATURE REEL
3 | overview.quickSetup.title=SETUP DOCUMENTATION
4 | overview.usefulLinks.title=USEFUL LINKS
5 | overview.yourSerial.title=SYSTEM SERIAL
6 | helpzone.title=Getting Started
7 | overview.read=Overview Read
8 | overview.gettingStarted.title=Getting Started
9 | userOverview.title=Overview
10 |
11 | error.readingArticleList=There was an error while reading the article list.
12 | error.readingVideoList=There was an error while reading the video list.
13 | error.readingDocumentationList=There was an error while reading the documentation list.
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/forward/ForwardingTransport.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.server.forward;
9 |
10 | public enum ForwardingTransport {
11 | TCP,
12 | UDP,
13 | BOTH;
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/UnauthorizedResourceAccessEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import com.hypersocket.session.Session;
4 |
5 | public class UnauthorizedResourceAccessEvent extends ResourceSessionEvent {
6 |
7 | private static final long serialVersionUID = -7803270921133945714L;
8 |
9 | public static final String EVENT_RESOURCE_KEY = "unauthorized.resourceAccess";
10 |
11 | public UnauthorizedResourceAccessEvent(Object source, Resource resource, Session session) {
12 | super(source, EVENT_RESOURCE_KEY, false, session, resource);
13 | }
14 |
15 | public boolean isUsage() {
16 | return false;
17 | }
18 |
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/tasks/monitorPort.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
9 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/mixin/MigrationMixIn.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.mixin;
2 |
3 | import com.fasterxml.jackson.annotation.JsonGetter;
4 | import com.fasterxml.jackson.annotation.JsonIgnore;
5 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
6 |
7 | import java.util.Date;
8 |
9 | @JsonIgnoreProperties(ignoreUnknown = true)
10 | public interface MigrationMixIn {
11 |
12 | @JsonIgnore
13 | Long getId();
14 |
15 | @JsonGetter("_meta")
16 | @JsonIgnore(false)
17 | String _meta();
18 |
19 | @JsonIgnore
20 | Date getModifiedDate();
21 |
22 | @JsonIgnore
23 | Date getCreateDate();
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/utils/MultipartObject.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.utils;
2 |
3 | import java.io.File;
4 |
5 | public class MultipartObject {
6 | String property;
7 | File file;
8 |
9 | public MultipartObject(String property, File file) {
10 | super();
11 | this.property = property;
12 | this.file = file;
13 | }
14 |
15 | public String getProperty() {
16 | return property;
17 | }
18 |
19 | public void setProperty(String property) {
20 | this.property = property;
21 | }
22 |
23 | public File getFile() {
24 | return file;
25 | }
26 |
27 | public void setFile(File file) {
28 | this.file = file;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/interfaceState/UserInterfaceStateRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.interfaceState;
2 |
3 | import com.hypersocket.realm.Realm;
4 | import com.hypersocket.resource.AbstractResourceRepository;
5 |
6 | public interface UserInterfaceStateRepository extends
7 | AbstractResourceRepository {
8 |
9 | UserInterfaceState getStateByResourceId(Long resourceId);
10 |
11 | void updateState(UserInterfaceState newState);
12 |
13 | UserInterfaceState getState(String name, Long principalId,
14 | String resourceCategory, Realm realm);
15 |
16 | UserInterfaceState getState(String name, String resourceCategory,
17 | Realm realm);
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/AnchorField.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.input;
2 |
3 | public class AnchorField extends InputField {
4 |
5 | boolean isLogonApiLink = true;
6 |
7 | public AnchorField() {
8 | }
9 |
10 | public AnchorField(String resourceKey,
11 | String defaultValue, boolean required, String label) {
12 | super(InputFieldType.a, resourceKey, defaultValue, required, label);
13 | }
14 |
15 | public AnchorField(String resourceKey,
16 | String defaultValue, boolean required, String label, boolean isLogonApiLink) {
17 | super(InputFieldType.a, resourceKey, defaultValue, required, label);
18 | this.isLogonApiLink = isLogonApiLink;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/events/CommonAttributes.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.events;
2 |
3 | public interface CommonAttributes {
4 |
5 | public static final String ATTR_IP_ADDRESS = "attr.ipAddress";
6 | public static final String ATTR_SCHEME = "attr.scheme";
7 | public static final String ATTR_MODULE = "attr.module";
8 | public static final String ATTR_PRINCIPAL_NAME = "attr.principalName";
9 | public static final String ATTR_PRINCIPAL_REALM = "attr.principalRealm";
10 | public static final String ATTR_HINT = "attr.hint";
11 | public static final String ATTR_REALM_NAME = "attr.realmName";
12 | public static final String ATTR_RESOURCE_NAME = "attr.resourceName";
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/feedback/FeedbackService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.feedback;
2 |
3 | import org.quartz.SchedulerException;
4 |
5 | import com.hypersocket.auth.AuthenticatedService;
6 | import com.hypersocket.scheduler.PermissionsAwareJobData;
7 |
8 | public interface FeedbackService extends AuthenticatedService {
9 |
10 | FeedbackProgress startJob(Class extends FeedbackEnabledJob> jobClz, PermissionsAwareJobData data,
11 | String jobResourceKey) throws SchedulerException;
12 |
13 | FeedbackProgress createFeedbackProgress();
14 |
15 | FeedbackProgress getFeedbackProgress(String uuid);
16 |
17 | void closeFeedbackProgress(FeedbackProgress progress);
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/properties/MigrationProperties.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.properties;
2 |
3 | import com.hypersocket.migration.repository.MigrationExportCriteriaBuilder;
4 | import com.hypersocket.migration.repository.MigrationLookupCriteriaBuilder;
5 | import com.hypersocket.repository.AbstractEntity;
6 |
7 | import java.util.List;
8 | import java.util.Map;
9 |
10 | public interface MigrationProperties {
11 | Short sortOrder();
12 | List>> getOrderList();
13 | Map, MigrationExportCriteriaBuilder> getExportCriteriaMap();
14 | Map, MigrationLookupCriteriaBuilder> getLookupCriteriaMap();
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/interfaces/InterfaceRegistrationServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.interfaces;
2 |
3 | import java.util.HashSet;
4 | import java.util.Set;
5 |
6 | import org.springframework.stereotype.Service;
7 |
8 | @Service
9 | public class InterfaceRegistrationServiceImpl implements InterfaceRegistrationService {
10 |
11 | Set additionalInterfacesPages = new HashSet();
12 |
13 | @Override
14 | public void registerAdditionalInterface(String page) {
15 | additionalInterfacesPages.add(page);
16 | }
17 |
18 | @Override
19 | public Set getAdditionalInterfacePages() {
20 | return additionalInterfacesPages;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/automation/DailySchedulerJob.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.automation;
2 |
3 | import org.quartz.JobExecutionContext;
4 | import org.quartz.JobExecutionException;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 |
7 | import com.hypersocket.scheduler.PermissionsAwareJob;
8 |
9 | public class DailySchedulerJob extends PermissionsAwareJob {
10 |
11 | public DailySchedulerJob() {
12 | }
13 |
14 | @Autowired
15 | AutomationResourceService automationService;
16 |
17 | @Override
18 | protected void executeJob(JobExecutionContext context)
19 | throws JobExecutionException {
20 |
21 | automationService.scheduleDailyJobs();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/AuthenticationException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.auth;
9 |
10 | public class AuthenticationException extends Exception {
11 |
12 | private static final long serialVersionUID = -3100457742863907404L;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/session/events/SessionClosedEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.session.events;
2 |
3 | import org.apache.commons.lang3.ArrayUtils;
4 |
5 | import com.hypersocket.session.Session;
6 |
7 | public class SessionClosedEvent extends SessionStateEvent {
8 |
9 | private static final long serialVersionUID = -4449174449795883302L;
10 |
11 | public static final String EVENT_RESOURCE_KEY = "session.closed";
12 |
13 | public SessionClosedEvent(Object source,
14 | Session session) {
15 | super(source, EVENT_RESOURCE_KEY, true, session);
16 | }
17 |
18 | public String[] getResourceKeys() {
19 | return ArrayUtils.add(super.getResourceKeys(), EVENT_RESOURCE_KEY);
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/auth/json/UnauthorizedException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.auth.json;
9 |
10 | public class UnauthorizedException extends Exception {
11 |
12 | private static final long serialVersionUID = 529531975586967571L;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/events/ServerStartedEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.events;
2 |
3 | import org.apache.commons.lang3.ArrayUtils;
4 |
5 | import com.hypersocket.realm.Realm;
6 |
7 | public class ServerStartedEvent extends HypersocketServerEvent {
8 |
9 | private static final long serialVersionUID = -3913157834293856133L;
10 |
11 | public final static String EVENT_RESOURCE_KEY = "event.serverStarted";
12 |
13 | public ServerStartedEvent(Object source, Realm currentRealm) {
14 | super(source, EVENT_RESOURCE_KEY, true, currentRealm);
15 | }
16 |
17 | public String[] getResourceKeys() {
18 | return ArrayUtils.add(super.getResourceKeys(), EVENT_RESOURCE_KEY);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/events/ServerStoppedEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.events;
2 |
3 | import org.apache.commons.lang3.ArrayUtils;
4 |
5 | import com.hypersocket.realm.Realm;
6 |
7 | public class ServerStoppedEvent extends HypersocketServerEvent {
8 |
9 | private static final long serialVersionUID = 2199176889846404649L;
10 |
11 | public final static String EVENT_RESOURCE_KEY = "event.serverStopped";
12 |
13 | public ServerStoppedEvent(Object source, Realm currentRealm) {
14 | super(source, EVENT_RESOURCE_KEY, true, currentRealm);
15 | }
16 |
17 | public String[] getResourceKeys() {
18 | return ArrayUtils.add(super.getResourceKeys(), EVENT_RESOURCE_KEY);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/forward/ForwardingService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.forward;
2 |
3 | import com.hypersocket.auth.AuthenticatedService;
4 | import com.hypersocket.permissions.AccessDeniedException;
5 | import com.hypersocket.resource.ResourceNotFoundException;
6 | import com.hypersocket.session.Session;
7 |
8 | public interface ForwardingService extends
9 | AuthenticatedService {
10 |
11 | void verifyResourceSession(T resource, String hostname, int port,
12 | ForwardingTransport transport, Session session)
13 | throws AccessDeniedException;
14 |
15 | T getResourceById(Long id) throws ResourceNotFoundException, AccessDeniedException;
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/dashboard/message/DashboardMessageRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.dashboard.message;
2 |
3 | import java.util.List;
4 |
5 | import com.hypersocket.resource.AbstractResourceRepository;
6 |
7 | public interface DashboardMessageRepository extends
8 | AbstractResourceRepository {
9 |
10 | void saveNewMessages(List dashboardMessageList);
11 |
12 | List getMessages();
13 |
14 | List getUnexpiredMessages(int pageNum);
15 |
16 | DashboardMessage getMessage(DashboardMessage dashboardMessage);
17 |
18 | void saveNewMessage(DashboardMessage dashboardMessage);
19 |
20 | Long getMessageCount();
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/events/ServerStartingEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.events;
2 |
3 | import org.apache.commons.lang3.ArrayUtils;
4 |
5 | import com.hypersocket.realm.Realm;
6 |
7 | public class ServerStartingEvent extends HypersocketServerEvent {
8 |
9 | private static final long serialVersionUID = 2326113440143956901L;
10 |
11 | public final static String EVENT_RESOURCE_KEY = "event.serverStarting";
12 |
13 | public ServerStartingEvent(Object source, Realm currentRealm) {
14 | super(source, EVENT_RESOURCE_KEY, true, currentRealm);
15 | }
16 |
17 | public String[] getResourceKeys() {
18 | return ArrayUtils.add(super.getResourceKeys(), EVENT_RESOURCE_KEY);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/events/ServerStoppingEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.events;
2 |
3 | import org.apache.commons.lang3.ArrayUtils;
4 |
5 | import com.hypersocket.realm.Realm;
6 |
7 | public class ServerStoppingEvent extends HypersocketServerEvent {
8 |
9 | private static final long serialVersionUID = -302922543628681693L;
10 |
11 | public final static String EVENT_RESOURCE_KEY = "event.serverStopping";
12 |
13 | public ServerStoppingEvent(Object source, Realm currentRealm) {
14 | super(source, EVENT_RESOURCE_KEY, true, currentRealm);
15 | }
16 |
17 | public String[] getResourceKeys() {
18 | return ArrayUtils.add(super.getResourceKeys(), EVENT_RESOURCE_KEY);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/realms/WithAdminPermissionTests.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.realms;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.AfterClass;
6 | import org.junit.BeforeClass;
7 |
8 | import com.fasterxml.jackson.core.JsonParseException;
9 | import com.fasterxml.jackson.databind.JsonMappingException;
10 |
11 | public class WithAdminPermissionTests extends AbstractPermissionsTest {
12 |
13 | @BeforeClass
14 | public static void logOn() throws Exception {
15 | logon("System", "admin", "Password123?");
16 | }
17 |
18 | @AfterClass
19 | public static void logOff() throws JsonParseException,
20 | JsonMappingException, IOException {
21 | logoff();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/roles/WithAdminPermissionTests.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.roles;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.AfterClass;
6 | import org.junit.BeforeClass;
7 |
8 | import com.fasterxml.jackson.core.JsonParseException;
9 | import com.fasterxml.jackson.databind.JsonMappingException;
10 |
11 | public class WithAdminPermissionTests extends AbstractPermissionsTest {
12 |
13 | @BeforeClass
14 | public static void logOn() throws Exception {
15 | logon("System", "admin", "Password123?");
16 | }
17 |
18 | @AfterClass
19 | public static void logOff() throws JsonParseException,
20 | JsonMappingException, IOException {
21 | logoff();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/server/WithAdminPermissionTests.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.server;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.AfterClass;
6 | import org.junit.BeforeClass;
7 |
8 | import com.fasterxml.jackson.core.JsonParseException;
9 | import com.fasterxml.jackson.databind.JsonMappingException;
10 |
11 | public class WithAdminPermissionTests extends AbstractPermissionsTest {
12 |
13 | @BeforeClass
14 | public static void logOn() throws Exception {
15 | logon("System", "admin", "Password123?");
16 | }
17 |
18 | @AfterClass
19 | public static void logOff() throws JsonParseException,
20 | JsonMappingException, IOException {
21 | logoff();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/session/WithAdminPermissionTests.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.session;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.AfterClass;
6 | import org.junit.BeforeClass;
7 |
8 | import com.fasterxml.jackson.core.JsonParseException;
9 | import com.fasterxml.jackson.databind.JsonMappingException;
10 |
11 | public class WithAdminPermissionTests extends AbstractPermissionsTest {
12 |
13 | @BeforeClass
14 | public static void logOn() throws Exception {
15 | logon("System", "admin", "Password123?");
16 | }
17 |
18 | @AfterClass
19 | public static void logOff() throws JsonParseException,
20 | JsonMappingException, IOException {
21 | logoff();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/RealmAdapter.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | import com.hypersocket.resource.ResourceChangeException;
4 | import com.hypersocket.resource.ResourceCreationException;
5 |
6 | public class RealmAdapter implements RealmListener {
7 |
8 | @Override
9 | public void onCreateRealm(Realm realm) throws ResourceCreationException {
10 |
11 | }
12 |
13 | @Override
14 | public void onUpdateRealm(Realm realm) throws ResourceChangeException {
15 |
16 | }
17 |
18 | @Override
19 | public void onDeleteRealm(Realm realm) throws ResourceChangeException {
20 |
21 | }
22 |
23 | @Override
24 | public boolean hasCreatedDefaultResources(Realm realm) {
25 | return true;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/mixin/entity/CertificateResourceMigrationMixIn.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.mixin.entity;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnore;
4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
5 | import com.hypersocket.certificates.CertificateResource;
6 | import com.hypersocket.migration.mixin.MigrationMixIn;
7 |
8 | @JsonIgnoreProperties(ignoreUnknown = true)
9 | public class CertificateResourceMigrationMixIn extends CertificateResource implements MigrationMixIn{
10 |
11 | private CertificateResourceMigrationMixIn() {}
12 |
13 | @Override
14 | @JsonIgnore(false)
15 | public String getPrivateKey() {
16 | return null;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/currentRealm/WithAdminPermissionTests.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.currentRealm;
2 |
3 | import java.io.IOException;
4 |
5 | import org.junit.AfterClass;
6 | import org.junit.BeforeClass;
7 |
8 | import com.fasterxml.jackson.core.JsonParseException;
9 | import com.fasterxml.jackson.databind.JsonMappingException;
10 |
11 | public class WithAdminPermissionTests extends AbstractPermissionsTest {
12 |
13 | @BeforeClass
14 | public static void logOn() throws Exception {
15 | logon("System", "admin", "Password123?");
16 | }
17 |
18 | @AfterClass
19 | public static void logOff() throws JsonParseException,
20 | JsonMappingException, IOException {
21 | logoff();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/TriggerResourceRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers;
2 |
3 | import java.util.Collection;
4 | import java.util.List;
5 |
6 | import com.hypersocket.events.SystemEvent;
7 | import com.hypersocket.resource.AbstractResourceRepository;
8 | import com.hypersocket.tasks.TaskProvider;
9 |
10 |
11 | public interface TriggerResourceRepository extends
12 | AbstractResourceRepository {
13 |
14 | void registerActionRepository(TaskProvider action);
15 |
16 | List getTriggersForEvent(SystemEvent event);
17 |
18 | TriggerCondition getConditionById(Long id);
19 |
20 | Collection getActionsByResourceKey(String resourceKey);
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/websocket/TCPForwardingClientCallback.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.server.websocket;
9 |
10 | public interface TCPForwardingClientCallback extends WebsocketClientCallback {
11 |
12 | int getPort();
13 |
14 | String getHostname();
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/permissions/UnauthorizedTest.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.permissions;
2 |
3 | import org.apache.http.client.ClientProtocolException;
4 | import org.junit.Test;
5 |
6 | import com.hypersocket.tests.AbstractServerTest;
7 |
8 | public class UnauthorizedTest extends AbstractServerTest {
9 |
10 |
11 | @Test(expected=ClientProtocolException.class)
12 | public void accessPermissionListwithoutLogin() throws Exception{
13 | doGet("/hypersocket/api/permissions/list");
14 | }
15 |
16 | @Test(expected=ClientProtocolException.class)
17 | public void accessPermissionWithoutLogin() throws Exception{
18 | doGet("/hypersocket/api/permissions/permission/config.read/");
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/local/LocalRealmProvider.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.local;
9 |
10 | import com.hypersocket.realm.RealmProvider;
11 |
12 | public interface LocalRealmProvider extends RealmProvider {
13 |
14 | static final String RESOURCE_BUNDLE = "LocalRealm";
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/ResourcePropertyStore.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | import java.util.Collection;
4 |
5 | import com.hypersocket.resource.AbstractResource;
6 |
7 | public interface ResourcePropertyStore extends XmlTemplatePropertyStore {
8 |
9 | String getPropertyValue(AbstractPropertyTemplate template, AbstractResource resource);
10 |
11 | void setPropertyValue(AbstractPropertyTemplate template, AbstractResource resource, String value);
12 |
13 | boolean hasPropertyValueSet(AbstractPropertyTemplate template, AbstractResource resource);
14 |
15 | Collection getPropertyNames();
16 |
17 | String getDecryptedValue(AbstractPropertyTemplate template, AbstractResource resource);
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/dashboard/OverviewWidgetService.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.dashboard;
2 |
3 | import java.util.Collection;
4 | import java.util.List;
5 |
6 | import com.hypersocket.permissions.AccessDeniedException;
7 | import com.hypersocket.resource.ResourceException;
8 |
9 | public interface OverviewWidgetService {
10 |
11 | public void registerWidget(String resourceKey, OverviewWidget widget);
12 |
13 | public List getWidgets(String resourceKey) throws AccessDeniedException;
14 |
15 | public Collection getLinks() throws ResourceException;
16 |
17 | public Collection getVideos() throws ResourceException;
18 |
19 | public Collection getDocumentation() throws ResourceException;
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/PrincipalType.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.realm;
9 |
10 | public enum PrincipalType {
11 |
12 | USER,
13 | GROUP,
14 | SERVICE,
15 | SYSTEM;
16 |
17 | public static final PrincipalType[] ALL_TYPES = { USER, GROUP, SERVICE, SYSTEM };
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/upload/FileUploadRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.upload;
2 |
3 | import org.springframework.stereotype.Repository;
4 | import org.springframework.transaction.annotation.Transactional;
5 |
6 | import com.hypersocket.resource.AbstractResourceRepositoryImpl;
7 |
8 | @Repository
9 | public class FileUploadRepositoryImpl extends
10 | AbstractResourceRepositoryImpl implements
11 | FileUploadRepository {
12 |
13 | @Override
14 | protected Class getResourceClass() {
15 | return FileUpload.class;
16 | }
17 |
18 | @Override
19 | @Transactional(readOnly=true)
20 | public FileUpload getFileByUuid(String uuid) {
21 | return get("name", uuid, FileUpload.class);
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/events/WebappCreatedEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.events;
2 |
3 | import org.apache.commons.lang3.ArrayUtils;
4 |
5 | import com.hypersocket.realm.Realm;
6 |
7 | public class WebappCreatedEvent extends HypersocketServerEvent {
8 |
9 | private static final long serialVersionUID = -4644461545912219190L;
10 |
11 | public final static String EVENT_RESOURCE_KEY = "event.webappCreated";
12 |
13 | public WebappCreatedEvent(Object source,
14 | boolean success, Realm currentRealm) {
15 | super(source, EVENT_RESOURCE_KEY, success, currentRealm);
16 | }
17 |
18 | public String[] getResourceKeys() {
19 | return ArrayUtils.add(super.getResourceKeys(), EVENT_RESOURCE_KEY);
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/COPYRIGHT:
--------------------------------------------------------------------------------
1 | Copyright (C) 2013-14 Hypersocket Limited
2 |
3 | This program is free software: you can redistribute it and/or modify
4 | it under the terms of the GNU General Public License as published by
5 | the Free Software Foundation, either version 3 of the License, or
6 | (at your option) any later version.
7 |
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU General Public License for more details.
12 |
13 | You should have received a copy of the GNU General Public License
14 | along with this program. If not, see .
15 |
16 | Developers
17 | Lee David Painter
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/mixin/entity/LocalUserMigrationMixIn.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.mixin.entity;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnore;
4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
5 | import com.hypersocket.local.LocalGroup;
6 | import com.hypersocket.local.LocalUser;
7 | import com.hypersocket.migration.mixin.MigrationMixIn;
8 |
9 | import java.util.Set;
10 |
11 | @JsonIgnoreProperties(ignoreUnknown = true)
12 | public class LocalUserMigrationMixIn extends LocalUser implements MigrationMixIn {
13 |
14 | private LocalUserMigrationMixIn() {}
15 |
16 | @Override
17 | @JsonIgnore
18 | public Set getGroups() {
19 | return null;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/PersonalRestriction.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import org.hibernate.Criteria;
4 | import org.hibernate.criterion.Restrictions;
5 |
6 | import com.hypersocket.repository.CriteriaConfiguration;
7 |
8 | public class PersonalRestriction implements CriteriaConfiguration {
9 |
10 | boolean personal;
11 |
12 | public PersonalRestriction(boolean personal) {
13 | this.personal = personal;
14 | }
15 |
16 | @Override
17 | public void configure(Criteria criteria) {
18 | if(personal) {
19 | criteria.add(Restrictions.eq("personal", true));
20 | } else {
21 | criteria.add(Restrictions.or(Restrictions.isNull("personal"), Restrictions.eq("personal", false)));
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/execution/stack/MigrationCurrentInfo.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.execution.stack;
2 |
3 | public class MigrationCurrentInfo {
4 |
5 | private Object bean;
6 | private String propName;
7 |
8 | public MigrationCurrentInfo(Object bean, String propName) {
9 | this.bean = bean;
10 | this.propName = propName;
11 | }
12 |
13 | public Object getBean() {
14 | return bean;
15 | }
16 |
17 | public void setBean(Object bean) {
18 | this.bean = bean;
19 | }
20 |
21 | public String getPropName() {
22 | return propName;
23 | }
24 |
25 | public void setPropName(String propName) {
26 | this.propName = propName;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/UserPrincipal.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.realm;
9 |
10 | import java.util.Date;
11 |
12 | public abstract class UserPrincipal extends Principal {
13 |
14 | public abstract Date getLastPasswordChange();
15 |
16 | public abstract Date getLastSignOn();
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/interfaces/InterfaceResourceRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.interfaces;
2 |
3 | import javax.annotation.PostConstruct;
4 |
5 | import org.springframework.stereotype.Repository;
6 |
7 | import com.hypersocket.resource.AbstractResourceRepositoryImpl;
8 |
9 | @Repository
10 | public class InterfaceResourceRepositoryImpl extends AbstractResourceRepositoryImpl
11 | implements InterfaceResourceRepository {
12 |
13 |
14 | @PostConstruct
15 | private void postConstruct() {
16 | loadPropertyTemplates("interfaceResourceTemplate.xml");
17 | }
18 |
19 | @Override
20 | protected Class getResourceClass() {
21 | return InterfaceResource.class;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/websocket/WebsocketClient.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.server.websocket;
9 |
10 |
11 | public interface WebsocketClient {
12 |
13 | void open();
14 |
15 | void close();
16 |
17 | long getTotalBytesIn();
18 |
19 | long getTotalBytesOut();
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/certificates/WithAdminPermissionTest.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.certificates;
2 |
3 | import java.io.IOException;
4 | import org.junit.AfterClass;
5 | import org.junit.BeforeClass;
6 | import com.fasterxml.jackson.core.JsonParseException;
7 | import com.fasterxml.jackson.databind.JsonMappingException;
8 |
9 |
10 |
11 | public class WithAdminPermissionTest extends AbstractPermissionsTest {
12 |
13 |
14 | @BeforeClass
15 | public static void LogOn() throws Exception {
16 | logon("System", "admin", "Password123?");
17 |
18 | }
19 |
20 | @AfterClass
21 | public static void logOff() throws JsonParseException,
22 | JsonMappingException, IOException {
23 | logoff();
24 | }
25 |
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/json/JsonPrincipalType.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.json;
9 |
10 | public enum JsonPrincipalType {
11 |
12 | USER,
13 | GROUP,
14 | SERVICE,
15 | SYSTEM;
16 |
17 | public static final JsonPrincipalType[] ALL_TYPES = { USER, GROUP, SERVICE, SYSTEM };
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/permissions/PermissionType.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.permissions;
9 |
10 | public interface PermissionType {
11 |
12 | String getResourceKey();
13 |
14 | boolean isSystem();
15 |
16 | PermissionType[] impliesPermissions();
17 |
18 | boolean isHidden();
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/upload/json/IconEntry.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.upload.json;
2 |
3 | public class IconEntry {
4 |
5 | String value;
6 | String name;
7 | String icon;
8 |
9 | public IconEntry() {
10 | }
11 |
12 | public IconEntry(String value, String name) {
13 | this.value = value;
14 | this.name = name;
15 | }
16 |
17 | public String getValue() {
18 | return value;
19 | }
20 |
21 | void setValue(String id) {
22 | this.value = id;
23 | }
24 |
25 | public String getName() {
26 | return name;
27 | }
28 |
29 | void setName(String name) {
30 | this.name = name;
31 | }
32 |
33 | public String getIcon() {
34 | return icon;
35 | }
36 |
37 | void setIcon(String icon) {
38 | this.icon = icon;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/properties/PropertyTemplate.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.properties;
9 |
10 |
11 |
12 | public class PropertyTemplate extends AbstractPropertyTemplate {
13 |
14 | @Override
15 | public String getValue() {
16 | return propertyStore.getPropertyValue(this);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-tests/src/test/java/com/hypersocket/tests/json/utils/PropertyObject.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tests.json.utils;
2 |
3 | public class PropertyObject {
4 | String proertyName;
5 | String propertyValue;
6 |
7 |
8 | public PropertyObject(String proertyName, String propertyValue) {
9 | super();
10 | this.proertyName = proertyName;
11 | this.propertyValue = propertyValue;
12 | }
13 |
14 | public String getProertyName() {
15 | return proertyName;
16 | }
17 |
18 | public void setProertyName(String proertyName) {
19 | this.proertyName = proertyName;
20 | }
21 |
22 | public String getPropertyValue() {
23 | return propertyValue;
24 | }
25 |
26 | public void setPropertyValue(String propertyValue) {
27 | this.propertyValue = propertyValue;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/HiddenInputField.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.input;
9 |
10 | public class HiddenInputField extends InputField {
11 |
12 | public HiddenInputField(String resourceKey, String defaultValue) {
13 | super(InputFieldType.hidden, resourceKey, defaultValue, true, "");
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/PropertyResolver.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | import java.util.Collection;
4 |
5 | import com.hypersocket.resource.AbstractResource;
6 |
7 | public interface PropertyResolver {
8 |
9 | Collection getPropertyNames(AbstractResource resource);
10 |
11 | Collection getVariableNames(AbstractResource resource);
12 |
13 | PropertyTemplate getPropertyTemplate(AbstractResource resource,
14 | String resourceKey);
15 |
16 | Collection getPropertyCategories(
17 | AbstractResource resource);
18 |
19 | Collection getPropertyTemplates(
20 | AbstractResource resource);
21 |
22 | boolean hasPropertyTemplate(AbstractResource resource, String resourceKey);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/tables/BootstrapTablesResult.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tables;
2 |
3 | import java.util.Collection;
4 | import java.util.List;
5 |
6 | public class BootstrapTablesResult {
7 |
8 | String iTotalRecords;
9 | Collection> rows;
10 |
11 | public BootstrapTablesResult(Collection> rows, long totalRecords) {
12 | this.rows = rows;
13 | iTotalRecords = String.valueOf(totalRecords);
14 | }
15 |
16 | public void setTotal(String iTotalRecords) {
17 | this.iTotalRecords = iTotalRecords;
18 | }
19 |
20 | public String getTotal() {
21 | return iTotalRecords;
22 | }
23 |
24 | public Collection> getRows() {
25 | return rows;
26 | }
27 |
28 | public void setRows(List> aaData) {
29 | this.rows = aaData;
30 | }
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/utils/HttpUtils.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.utils;
2 |
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 | import java.util.Map;
6 |
7 | import org.apache.http.client.methods.CloseableHttpResponse;
8 | import org.apache.http.impl.client.CloseableHttpClient;
9 |
10 | public interface HttpUtils {
11 |
12 | CloseableHttpResponse doHttpGet(String uri, boolean allowSelfSigned, Map headers)
13 | throws IOException;
14 |
15 | InputStream doHttpGet(String uri, boolean allowSelfSigned) throws IOException;
16 |
17 | String doHttpPost(String url, Map parameters, boolean allowSelfSigned) throws IOException;
18 |
19 | CloseableHttpClient createHttpClient(boolean allowSelfSigned) throws IOException;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/attributes/user/UserAttributeRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.attributes.user;
2 |
3 | import com.hypersocket.realm.Realm;
4 | import com.hypersocket.resource.AbstractAssignableResourceRepository;
5 | import com.hypersocket.resource.ResourceChangeException;
6 | import com.hypersocket.resource.TransactionOperation;
7 |
8 | public interface UserAttributeRepository extends AbstractAssignableResourceRepository {
9 |
10 | Long getMaximumAttributeWeight(UserAttributeCategory cat);
11 |
12 | UserAttribute getAttributeByVariableName(String attributeName, Realm realm);
13 |
14 | void deleteResource(UserAttribute resource, @SuppressWarnings("unchecked") TransactionOperation... ops) throws ResourceChangeException;
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/auth/json/RedirectException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.auth.json;
9 |
10 | public class RedirectException extends Exception {
11 |
12 | private static final long serialVersionUID = -8592093219854938960L;
13 |
14 | public RedirectException(String location) {
15 | super(location);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/tables/json/BootstrapTablePageProcessor.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.tables.json;
2 |
3 | import java.io.IOException;
4 | import java.util.Collection;
5 |
6 | import com.hypersocket.auth.json.UnauthorizedException;
7 | import com.hypersocket.permissions.AccessDeniedException;
8 | import com.hypersocket.tables.Column;
9 | import com.hypersocket.tables.ColumnSort;
10 |
11 | public interface BootstrapTablePageProcessor {
12 |
13 | Column getColumn(String column);
14 |
15 | Collection> getPage(String searchColumn, String searchPattern, int start, int length, ColumnSort[] sorting) throws UnauthorizedException, AccessDeniedException;
16 |
17 | Long getTotalCount(String searchColumn, String searchPattern) throws UnauthorizedException, AccessDeniedException;
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-netty/src/main/resources/i18n/NettyServer.properties:
--------------------------------------------------------------------------------
1 | category.netty.label=Netty
2 | netty.receiveBuffer=Receive Buffer
3 | netty.receiveBuffer.info=The size of the socket receive buffer.
4 |
5 | netty.sendBuffer=Send Buffer
6 | netty.sendBuffer.info=The size of the socket send buffer.
7 |
8 | netty.backlog=Backlog
9 | netty.backlog.info=The size of the incoming connection queue.
10 |
11 | netty.maxChannels=Max Connections
12 | netty.maxChannels.info=The maximum number of connections supported.
13 |
14 | netty.maxChannelMemory=Max Memory (Per Connection)
15 | netty.maxChannelMemory.info=The maximum number of bytes that can be queued for each connection.
16 |
17 | netty.maxTotalMemory=Max Memory (All Connections)
18 | netty.maxTotalMemory.info=The maximum number of bytes that can be queued across all connections.
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/NameValuePair.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 | public class NameValuePair {
4 |
5 | String name;
6 | String value;
7 |
8 | public NameValuePair() {
9 |
10 | }
11 |
12 | public NameValuePair(String name, String value) {
13 | this.name = name;
14 | this.value = value;
15 | }
16 |
17 | public NameValuePair(String pair) {
18 | this.name = ResourceUtils.getNamePairKey(pair);
19 | this.value = ResourceUtils.getNamePairValue(pair);
20 | }
21 |
22 | public String getName() {
23 | return name;
24 | }
25 | public void setName(String name) {
26 | this.name = name;
27 | }
28 | public String getValue() {
29 | return value;
30 | }
31 | public void setValue(String value) {
32 | this.value = value;
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/TextInputField.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.input;
9 |
10 | public class TextInputField extends InputField {
11 |
12 |
13 | public TextInputField(String resourceKey, String defaultValue, boolean required, String label) {
14 | super(InputFieldType.text, resourceKey, defaultValue, required, label);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/PrincipalSuspensionRepository.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | import java.util.Collection;
4 | import java.util.List;
5 |
6 | import com.hypersocket.repository.AbstractRepository;
7 |
8 | public interface PrincipalSuspensionRepository extends
9 | AbstractRepository {
10 |
11 | void createPrincipalSuspension(PrincipalSuspension principalSuspension);
12 |
13 | void deletePrincipalSuspension(PrincipalSuspension suspension);
14 |
15 | void saveSuspension(PrincipalSuspension principalSuspension);
16 |
17 | Collection getSuspensions(Principal principal, PrincipalSuspensionType type);
18 |
19 | List getSuspensions();
20 |
21 | Collection getSuspensions(Principal principal);
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/handlers/impl/RedirectException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.server.handlers.impl;
9 |
10 | public class RedirectException extends Exception {
11 |
12 | private static final long serialVersionUID = 8821545531151846549L;
13 |
14 | public RedirectException(String arg0) {
15 | super(arg0);
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/websocket/WebsocketClientCallback.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.server.websocket;
9 |
10 | public interface WebsocketClientCallback {
11 |
12 | void websocketAccepted(WebsocketClient client);
13 |
14 | void websocketRejected(Throwable cause);
15 |
16 | void websocketClosed(WebsocketClient client);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/mixin/entity/PermissionCategoryMigrationMixIn.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.mixin.entity;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnore;
4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
5 | import com.hypersocket.migration.mixin.MigrationMixIn;
6 | import com.hypersocket.permissions.Permission;
7 | import com.hypersocket.permissions.PermissionCategory;
8 |
9 | import java.util.Set;
10 |
11 | @JsonIgnoreProperties(ignoreUnknown = true)
12 | public class PermissionCategoryMigrationMixIn extends PermissionCategory implements MigrationMixIn {
13 |
14 | private PermissionCategoryMigrationMixIn() {}
15 |
16 | @Override
17 | @JsonIgnore
18 | public Set getPermissions() {
19 | return null;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/PasswordInputField.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.input;
9 |
10 | public class PasswordInputField extends InputField {
11 |
12 | public PasswordInputField(String resourceKey, String defaultValue, boolean required, String label) {
13 | super(InputFieldType.password, resourceKey, defaultValue, required, label);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/interfaceState/UserInterfaceState.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.interfaceState;
2 |
3 | import javax.persistence.Column;
4 | import javax.persistence.Entity;
5 | import javax.persistence.Table;
6 |
7 | import com.hypersocket.resource.RealmResource;
8 |
9 | @Entity
10 | @Table(name = "interface_state")
11 | public class UserInterfaceState extends RealmResource {
12 |
13 | @Column(name = "preferences", length = 8000)
14 | String preferences;
15 |
16 | public UserInterfaceState() {
17 |
18 | }
19 |
20 | public UserInterfaceState(String preferences) {
21 | this.preferences = preferences;
22 | }
23 |
24 | public String getPreferences() {
25 | return preferences;
26 | }
27 |
28 | public void setPreferences(String preferences) {
29 | this.preferences = preferences;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/annotation/AnnotationService.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.annotation;
9 |
10 | import org.aspectj.lang.ProceedingJoinPoint;
11 |
12 | public interface AnnotationService {
13 |
14 | public Object process(ProceedingJoinPoint pjp) throws Throwable;
15 |
16 | void registerExtensionPoint(String id, HypersocketExtensionPoint ext);
17 | }
18 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/json/WebMvcMultipartResolver.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.json;
9 |
10 | import org.springframework.stereotype.Component;
11 | import org.springframework.web.multipart.commons.CommonsMultipartResolver;
12 |
13 | @Component(value="multipartResolver")
14 | public class WebMvcMultipartResolver extends CommonsMultipartResolver {
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/hypersocket-tasks/src/main/resources/i18n/MonitorPortTask.properties:
--------------------------------------------------------------------------------
1 | category.monitorPort.label=Monitor port
2 | monitorPort=Monitor TCP Port
3 | monitorPort.ip=Host Address
4 | monitorPort.ip.info=The host address to be monitored.
5 | monitorPort.port=Port
6 | monitorPort.port.info=The port to be monitored.
7 | monitorPort.timeout=Timeout
8 | monitorPort.timeout.info=Timeout period in Seconds.
9 | monitorPort.host.required=Host address is required
10 | monitorPort.port.required=Port value is required
11 | monitorPort.timout.required=timeout period is required
12 |
13 | monitorPort.result=Monitor TCP Port
14 | monitorPort.result.success=Port {attr.port} is up on {attr.host}.
15 | monitorPort.result.failure=Port {attr.port} is down on {attr.host}.
16 | seconds.label={0} seconds
17 |
18 | attr.host=Host
19 | attr.port=Port
20 | attr.timeout=Timeout
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/json/JsonResourceStatus.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.json;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 |
5 | @JsonIgnoreProperties(ignoreUnknown=true)
6 | public class JsonResourceStatus {
7 |
8 | boolean success;
9 | String error;
10 |
11 | JsonResource resource;
12 |
13 | public boolean isSuccess() {
14 | return success;
15 | }
16 |
17 | public void setSuccess(boolean success) {
18 | this.success = success;
19 | }
20 |
21 | public String getError() {
22 | return error;
23 | }
24 |
25 | public void setError(String error) {
26 | this.error = error;
27 | }
28 |
29 | public JsonResource getResource() {
30 | return resource;
31 | }
32 |
33 | public void setResource(JsonResource resource) {
34 | this.resource = resource;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/AuthenticatorResult.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.auth;
9 |
10 | public enum AuthenticatorResult {
11 |
12 | INSUFFICIENT_DATA,
13 | INSUFFICIENT_DATA_NO_ERROR,
14 | AUTHENTICATION_FAILURE_INVALID_PRINCIPAL,
15 | AUTHENTICATION_FAILURE_INVALID_REALM,
16 | AUTHENTICATION_FAILURE_INVALID_CREDENTIALS,
17 | AUTHENTICATION_SUCCESS;
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/properties/PropertiesFileProperty.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.properties;
2 |
3 |
4 | public class PropertiesFileProperty implements Property {
5 |
6 | PropertyTemplate template;
7 | String value;
8 |
9 | PropertiesFileProperty(PropertyTemplate template, String value) {
10 | this.template = template;
11 | this.value = value;
12 | }
13 |
14 | @Override
15 | public String getValue() {
16 | return value;
17 | }
18 |
19 | @Override
20 | public String getResourceKey() {
21 | return template.getResourceKey();
22 | }
23 |
24 | public boolean isHidden() {
25 | return template.isHidden();
26 | }
27 |
28 | public String getDefaultValue() {
29 | return template.getDefaultValue();
30 | }
31 |
32 | public int getWeight() {
33 | return template.getWeight();
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/json/JsonResourceStatusTemplate.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.json;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 |
5 | @JsonIgnoreProperties(ignoreUnknown=true)
6 | public class JsonResourceStatusTemplate {
7 |
8 | boolean success;
9 | String error;
10 |
11 | T resource;
12 |
13 | public boolean isSuccess() {
14 | return success;
15 | }
16 |
17 | public void setSuccess(boolean success) {
18 | this.success = success;
19 | }
20 |
21 | public String getError() {
22 | return error;
23 | }
24 |
25 | public void setError(String error) {
26 | this.error = error;
27 | }
28 |
29 | public T getResource() {
30 | return resource;
31 | }
32 |
33 | public void setResource(T resource) {
34 | this.resource = resource;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/IsTrueCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public class IsTrueCondition implements Condition {
9 |
10 | @Override
11 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException {
13 | if (!event.hasAttribute(condition.getAttributeKey())) {
14 | return false;
15 | }
16 |
17 | return Boolean.parseBoolean(event.getAttribute(condition.getAttributeKey()).toString());
18 | }
19 |
20 | @Override
21 | public boolean isValueRequired() {
22 | return false;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/RealmCriteria.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import org.hibernate.Criteria;
4 | import org.hibernate.criterion.Restrictions;
5 |
6 | import com.hypersocket.realm.Realm;
7 | import com.hypersocket.repository.CriteriaConfiguration;
8 |
9 | public class RealmCriteria implements CriteriaConfiguration {
10 |
11 | Realm realm;
12 | String column = "realm";
13 | public RealmCriteria(Realm realm) {
14 | this.realm = realm;
15 | }
16 |
17 | public RealmCriteria(Realm realm, String column) {
18 | this.realm = realm;
19 | this.column = column;
20 | }
21 |
22 | @Override
23 | public void configure(Criteria criteria) {
24 | if(realm==null) {
25 | criteria.add(Restrictions.isNull(column));
26 | } else {
27 | criteria.add(Restrictions.eq(column, realm));
28 | }
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/session/SessionResourceToken.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.session;
2 |
3 | import org.apache.commons.lang3.RandomStringUtils;
4 |
5 | public class SessionResourceToken {
6 |
7 | Session session;
8 | String shortCode;
9 | long timestamp = System.currentTimeMillis();
10 | T resource;
11 |
12 | public SessionResourceToken(Session session, T resource) {
13 | this.session = session;
14 | this.resource = resource;
15 | this.shortCode = SessionServiceImpl.TOKEN_PREFIX + RandomStringUtils.randomAlphanumeric(16);
16 | }
17 |
18 | public Session getSession() {
19 | return session;
20 | }
21 |
22 | public String getShortCode() {
23 | return shortCode;
24 | }
25 |
26 | public T getResource() {
27 | return resource;
28 | }
29 |
30 | public long getTimestamp() {
31 | return timestamp;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/json/JsonResourceList.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.json;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 |
5 | @JsonIgnoreProperties(ignoreUnknown=true)
6 | public class JsonResourceList {
7 |
8 | boolean success;
9 | String error;
10 |
11 | JsonResource[] resources;
12 |
13 | public boolean isSuccess() {
14 | return success;
15 | }
16 |
17 | public void setSuccess(boolean success) {
18 | this.success = success;
19 | }
20 |
21 | public String getError() {
22 | return error;
23 | }
24 |
25 | public void setError(String error) {
26 | this.error = error;
27 | }
28 |
29 | public JsonResource[] getResources() {
30 | return resources;
31 | }
32 |
33 | public void setResources(JsonResource[] resources) {
34 | this.resources = resources;
35 | }
36 |
37 |
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/realm/PasswordPermission.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.realm;
2 |
3 | import com.hypersocket.permissions.PermissionType;
4 |
5 | public enum PasswordPermission implements PermissionType {
6 |
7 | CHANGE("password.change");
8 |
9 | private final String val;
10 |
11 | private PermissionType[] implies;
12 |
13 | private PasswordPermission(final String val,
14 | PermissionType... implies) {
15 | this.val = val;
16 | this.implies = implies;
17 | }
18 |
19 | @Override
20 | public String getResourceKey() {
21 | return val;
22 | }
23 |
24 | @Override
25 | public boolean isSystem() {
26 | return false;
27 | }
28 |
29 | @Override
30 | public PermissionType[] impliesPermissions() {
31 | return implies;
32 | }
33 |
34 | @Override
35 | public boolean isHidden() {
36 | return false;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/RealmOrSystemRealmCriteria.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import org.hibernate.Criteria;
4 | import org.hibernate.criterion.Restrictions;
5 |
6 | import com.hypersocket.realm.Realm;
7 | import com.hypersocket.repository.CriteriaConfiguration;
8 |
9 | public class RealmOrSystemRealmCriteria implements CriteriaConfiguration {
10 |
11 | Realm realm;
12 | String column = "realm";
13 | public RealmOrSystemRealmCriteria(Realm realm) {
14 | this.realm = realm;
15 | }
16 |
17 | public RealmOrSystemRealmCriteria(Realm realm, String column) {
18 | this.realm = realm;
19 | this.column = column;
20 | }
21 |
22 | @Override
23 | public void configure(Criteria criteria) {
24 | if(realm!=null && !realm.isSystem()) {
25 | criteria.add(Restrictions.eq(column, realm));
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/IsNotTrueCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public class IsNotTrueCondition implements Condition {
9 |
10 | @Override
11 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException {
13 | if (!event.hasAttribute(condition.getAttributeKey())) {
14 | return false;
15 | }
16 |
17 | return !Boolean.parseBoolean(event.getAttribute(condition.getAttributeKey()).toString());
18 | }
19 |
20 | @Override
21 | public boolean isValueRequired() {
22 | return false;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/ehcache.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
16 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/NotEqualsCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public class NotEqualsCondition implements Condition {
9 |
10 | @Override
11 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException {
13 | if (!event.hasAttribute(condition.getAttributeKey())) {
14 | return false;
15 | }
16 |
17 | return !event.getAttribute(condition.getAttributeKey()).equals(
18 | condition.getConditionValue());
19 | }
20 |
21 | @Override
22 | public boolean isValueRequired() {
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/ExportedResource.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 |
6 | public class ExportedResource {
7 |
8 | Map properties = new HashMap();
9 | T resource;
10 |
11 | public ExportedResource() {
12 | }
13 |
14 | public ExportedResource(T resource, Map properties) {
15 | this.resource = resource;
16 | this.properties = properties;
17 | }
18 |
19 | public Map getProperties() {
20 | return properties;
21 | }
22 |
23 | public void setProperties(Map properties) {
24 | this.properties = properties;
25 | }
26 |
27 | public T getResource() {
28 | return resource;
29 | }
30 |
31 | public void setResource(T resource) {
32 | this.resource = resource;
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/AbstractReconcileService.properties:
--------------------------------------------------------------------------------
1 | reconcile.status.neverRun=Never Run
2 | reconcile.status.completed=Completed
3 | reconcile.status.failed=Failed
4 | reconcile.status.inprogress=In Progress
5 |
6 | reconcile.notScheduled=Not Scheduled
7 |
8 | resourceReconcile.event=Resource Reconcile Event
9 |
10 | resourceReconcile.started=Resource Reconcile Started
11 | resourceReconcile.started.success=The reconcile of resource {attr.resourceName} has started.
12 | resourceReconcile.started.failure=The reconcile of resource {attr.resourceName} failed to start. {attr.exception}
13 |
14 | resourceReconcile.completed=Resource Reconcile Completed
15 | resourceReconcile.completed.success=The reconcile of resource {attr.resourceName} completed successfully.
16 | resourceReconcile.completed.failure=The reconcile of resource {attr.resourceName} failed. {attr.exception}
--------------------------------------------------------------------------------
/hypersocket-common/src/main/java/com/hypersocket/input/SelectInputField.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.input;
9 |
10 |
11 | public class SelectInputField extends InputField {
12 |
13 | public SelectInputField() {
14 | }
15 |
16 | public SelectInputField(String resourceKey, String defaultValue, boolean required, String label) {
17 | super(InputFieldType.select, resourceKey, defaultValue, required, label);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/ResourceNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.resource;
9 |
10 | public class ResourceNotFoundException extends ResourceException {
11 |
12 | private static final long serialVersionUID = -5763235151026115782L;
13 |
14 | public ResourceNotFoundException(String bundle, String resourceKey,
15 | Object... args) {
16 | super(bundle, resourceKey, args);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/EndsWithCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public class EndsWithCondition implements Condition {
9 |
10 | @Override
11 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException {
13 | if (!event.hasAttribute(condition.getAttributeKey())) {
14 | return false;
15 | }
16 |
17 | return event.getAttribute(condition.getAttributeKey()).toString()
18 | .endsWith(condition.getConditionValue());
19 | }
20 |
21 | @Override
22 | public boolean isValueRequired() {
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-tests/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | hypersocket-tests
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.springframework.ide.eclipse.core.springbuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.m2e.core.maven2Builder
20 |
21 |
22 |
23 |
24 |
25 | org.springframework.ide.eclipse.core.springnature
26 | org.eclipse.jdt.core.javanature
27 | org.eclipse.m2e.core.maven2Nature
28 |
29 |
30 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/annotation/HypersocketExtension.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.annotation;
9 |
10 | import java.lang.annotation.ElementType;
11 | import java.lang.annotation.Retention;
12 | import java.lang.annotation.RetentionPolicy;
13 | import java.lang.annotation.Target;
14 |
15 | @Retention(RetentionPolicy.RUNTIME)
16 | @Target(ElementType.METHOD)
17 | public @interface HypersocketExtension {
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/session/events/SessionStateEvent.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.session.events;
2 |
3 | import org.apache.commons.lang3.ArrayUtils;
4 |
5 | import com.hypersocket.session.Session;
6 |
7 | public class SessionStateEvent extends SessionEvent {
8 |
9 | private static final long serialVersionUID = -593306796407403759L;
10 |
11 | public static final String EVENT_RESOURCE_KEY = "session.stateEvent";
12 |
13 | public SessionStateEvent(Object source, String resourceKey, boolean success, Session session) {
14 | super(source, resourceKey, success, session);
15 | }
16 |
17 | public SessionStateEvent(Object source, String resourceKey, Throwable e, Session session) {
18 | super(source, resourceKey, e, session);
19 | }
20 |
21 | public String[] getResourceKeys() {
22 | return ArrayUtils.add(super.getResourceKeys(), EVENT_RESOURCE_KEY);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/ContainsCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public class ContainsCondition implements Condition {
9 |
10 | @Override
11 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException {
13 | if (!event.hasAttribute(condition.getAttributeKey())) {
14 | return false;
15 | }
16 |
17 | return event.getAttribute(condition.getAttributeKey()).toString()
18 | .contains(condition.getConditionValue());
19 | }
20 |
21 | @Override
22 | public boolean isValueRequired() {
23 | return true;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/StartsWithCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public class StartsWithCondition implements Condition {
9 |
10 | @Override
11 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException {
13 | if (!event.hasAttribute(condition.getAttributeKey())) {
14 | return false;
15 | }
16 |
17 | return event.getAttribute(condition.getAttributeKey()).toString()
18 | .startsWith(condition.getConditionValue());
19 | }
20 |
21 | @Override
22 | public boolean isValueRequired() {
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/ConfigurationService.properties:
--------------------------------------------------------------------------------
1 | category.configuration=Configuration Administration
2 |
3 | config.read=Configuration Read
4 | config.read.desc=User can read configuration within a realm
5 |
6 | config.update=Configuration Update
7 | config.update.desc=User can update configuration within a realm.
8 |
9 | value.tooLarge=Value for {0} is too large.
10 |
11 | config.changed=Configuration Change
12 | config.changed.success={attr.principalName} changed the {attr.configItem} setting.
13 | config.changed.failure={attr.principalName} failed to change the setting for {attr.configItem}.
14 |
15 | attr.configOldValue=Value Before
16 | attr.configNewValue=Value Now
17 | attr.configItem=Configuration Name
18 | attr.configResourceKey=Configuration Key
19 |
20 | error.unexpectedError=Failed to update configuration. {0}
21 | error.genericError=Failed to update configuration. {0}
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/auth/json/AuthenticationRequired.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.auth.json;
9 |
10 | import java.lang.annotation.ElementType;
11 | import java.lang.annotation.Retention;
12 | import java.lang.annotation.RetentionPolicy;
13 | import java.lang.annotation.Target;
14 |
15 | @Retention(RetentionPolicy.RUNTIME)
16 | @Target(ElementType.METHOD)
17 | public @interface AuthenticationRequired {
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/migration/mixin/entity/JobResourceMigrationMixIn.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.migration.mixin.entity;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
5 | import com.hypersocket.jobs.JobResource;
6 | import com.hypersocket.migration.helper.MigrationDeserializer;
7 | import com.hypersocket.migration.mixin.MigrationMixIn;
8 |
9 | @JsonIgnoreProperties(ignoreUnknown = true)
10 | public class JobResourceMigrationMixIn extends JobResource implements MigrationMixIn {
11 |
12 | private JobResourceMigrationMixIn() {}
13 |
14 | @Override
15 | //@JsonSerialize(contentUsing = MigrationSerializerForResource.class)
16 | @JsonDeserialize(contentUsing = MigrationDeserializer.class)
17 | public JobResource getParentJob() {
18 | return null;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/DoesNotEndsWithCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public class DoesNotEndsWithCondition implements Condition {
9 |
10 | @Override
11 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException {
13 | if (!event.hasAttribute(condition.getAttributeKey())) {
14 | return false;
15 | }
16 |
17 | return !event.getAttribute(condition.getAttributeKey()).toString()
18 | .endsWith(condition.getConditionValue());
19 | }
20 |
21 | @Override
22 | public boolean isValueRequired() {
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/resources/i18n/TemplateService.properties:
--------------------------------------------------------------------------------
1 | template.email.label=Email
2 |
3 | template.create=Template Create
4 | template.update=Template Update
5 | template.read=Template Read
6 | template.delete=Template Delete
7 |
8 | template.update.title=Update Template
9 |
10 | templates.title=Templates
11 | templates.label=Templates
12 | template.label=Template
13 | template.create.title=Create Template
14 | template.name.label=Template Name
15 | template.name.info=The name of this template.
16 | template.type.label=Type
17 | template.type.info=The template type.
18 |
19 | template.subject.label=Subject
20 | template.subject.info=The subject line of this template.
21 |
22 | template.notSaved.title=Save Template?
23 | template.notSaved.info=The template has changes which have not been saved. Do you want to save the changes?
24 |
25 |
26 | font.huge=Huge
27 | font.normal=Normal
28 | font.small=Small
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/auth/BrowserEnvironment.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.auth;
9 |
10 |
11 | public enum BrowserEnvironment {
12 |
13 | USER_AGENT("User-Agent"),
14 | HOST("Host"),
15 | AUTHORIZATION("Authorization");
16 |
17 | private final String val;
18 |
19 | private BrowserEnvironment(final String val) {
20 | this.val = val;
21 | }
22 |
23 | public String toString() {
24 | return val;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/service/ServiceManagementServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.service;
2 |
3 | import java.util.Collection;
4 | import java.util.Collections;
5 | import java.util.HashMap;
6 | import java.util.Map;
7 |
8 | import org.springframework.stereotype.Service;
9 |
10 | import com.hypersocket.auth.AbstractAuthenticatedServiceImpl;
11 |
12 | @Service
13 | public class ServiceManagementServiceImpl extends AbstractAuthenticatedServiceImpl implements ServiceManagementService {
14 |
15 | Map services = new HashMap();
16 |
17 | @Override
18 | public void registerService(ManageableService service) {
19 | services.put(service.getResourceKey(), service);
20 | }
21 |
22 | @Override
23 | public Collection getServices() {
24 | return Collections.unmodifiableCollection(services.values());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/DoesNotStartsWithCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import com.hypersocket.events.SystemEvent;
4 | import com.hypersocket.triggers.TriggerCondition;
5 | import com.hypersocket.triggers.TriggerResource;
6 | import com.hypersocket.triggers.ValidationException;
7 |
8 | public class DoesNotStartsWithCondition implements Condition {
9 |
10 | @Override
11 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
12 | SystemEvent event) throws ValidationException {
13 | if (!event.hasAttribute(condition.getAttributeKey())) {
14 | return false;
15 | }
16 |
17 | return !event.getAttribute(condition.getAttributeKey()).toString()
18 | .startsWith(condition.getConditionValue());
19 | }
20 |
21 | @Override
22 | public boolean isValueRequired() {
23 | return true;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/json/FileUpload.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.json;
9 |
10 | import org.springframework.web.multipart.MultipartFile;
11 |
12 | public class FileUpload {
13 |
14 | MultipartFile file;
15 |
16 | public FileUpload() {
17 |
18 | }
19 |
20 | public MultipartFile getFile() {
21 | return file;
22 | }
23 |
24 | public void setFile(MultipartFile file) {
25 | this.file = file;
26 | }
27 |
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/jobs/TrackedJobData.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.jobs;
2 |
3 | import java.util.Locale;
4 |
5 | import com.hypersocket.realm.Principal;
6 | import com.hypersocket.realm.Realm;
7 | import com.hypersocket.scheduler.PermissionsAwareJobData;
8 |
9 | public class TrackedJobData extends PermissionsAwareJobData {
10 |
11 | private static final long serialVersionUID = -2828631488989447503L;
12 |
13 | String uuid;
14 |
15 | public TrackedJobData(Realm currentRealm, String jobResourceKey, String uuid) {
16 | super(currentRealm, jobResourceKey);
17 | this.uuid = uuid;
18 | }
19 |
20 | public TrackedJobData(Realm currentRealm, Principal principal,
21 | Locale locale, String jobResourceKey, String uuid) {
22 | super(currentRealm, principal, locale, jobResourceKey);
23 | this.uuid = uuid;
24 | }
25 |
26 | public String getUUID() {
27 | return uuid;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/repository/DistinctRootEntity.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.repository;
9 |
10 | import org.hibernate.Criteria;
11 | import org.hibernate.criterion.CriteriaSpecification;
12 |
13 | public class DistinctRootEntity implements CriteriaConfiguration {
14 |
15 | @Override
16 | public void configure(Criteria criteria) {
17 | criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/triggers/conditions/IsEmptyCondition.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.triggers.conditions;
2 |
3 | import org.apache.commons.lang3.StringUtils;
4 |
5 | import com.hypersocket.events.SystemEvent;
6 | import com.hypersocket.triggers.TriggerCondition;
7 | import com.hypersocket.triggers.TriggerResource;
8 | import com.hypersocket.triggers.ValidationException;
9 |
10 | public class IsEmptyCondition implements Condition {
11 |
12 | @Override
13 | public boolean checkCondition(TriggerCondition condition, TriggerResource trigger,
14 | SystemEvent event) throws ValidationException {
15 | if (!event.hasAttribute(condition.getAttributeKey())) {
16 | return false;
17 | }
18 |
19 | return StringUtils.isBlank(event.getAttribute(condition.getAttributeKey()).toString());
20 | }
21 |
22 | @Override
23 | public boolean isValueRequired() {
24 | return false;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/hypersocket-json/src/main/java/com/hypersocket/resource/ResourceUpdate.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.resource;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import com.hypersocket.properties.json.PropertyItem;
5 |
6 | @JsonIgnoreProperties(ignoreUnknown=true)
7 | public class ResourceUpdate {
8 |
9 | Long id;
10 | String name;
11 | PropertyItem[] properties;
12 |
13 | public ResourceUpdate() {
14 |
15 | }
16 |
17 | public Long getId() {
18 | return id;
19 | }
20 |
21 | public void setId(Long id) {
22 | this.id = id;
23 | }
24 |
25 | public String getName() {
26 | return name;
27 | }
28 |
29 | public void setName(String name) {
30 | this.name = name;
31 | }
32 |
33 | public PropertyItem[] getProperties() {
34 | return properties;
35 | }
36 |
37 | public void setProperties(PropertyItem[] properties) {
38 | this.properties = properties;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/hypersocket-server/src/main/java/com/hypersocket/server/interfaces/http/HTTPInterfaceResourceRepositoryImpl.java:
--------------------------------------------------------------------------------
1 | package com.hypersocket.server.interfaces.http;
2 |
3 | import java.util.Collection;
4 |
5 | import org.springframework.stereotype.Repository;
6 | import org.springframework.transaction.annotation.Transactional;
7 |
8 | import com.hypersocket.resource.AbstractResourceRepositoryImpl;
9 |
10 | @Repository
11 | public class HTTPInterfaceResourceRepositoryImpl extends
12 | AbstractResourceRepositoryImpl implements
13 | HTTPInterfaceResourceRepository {
14 |
15 | @Override
16 | protected Class getResourceClass() {
17 | return HTTPInterfaceResource.class;
18 | }
19 |
20 | @Override
21 | @Transactional(readOnly=true)
22 | public Collection allInterfaces() {
23 | return allEntities(HTTPInterfaceResource.class);
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/hypersocket-core/src/main/java/com/hypersocket/resource/AssignableResourceRepository.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2013 Hypersocket Limited.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the GNU Public License v3.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.gnu.org/licenses/gpl.html
7 | ******************************************************************************/
8 | package com.hypersocket.resource;
9 |
10 | import java.util.List;
11 |
12 | import com.hypersocket.properties.ResourceTemplateRepository;
13 | import com.hypersocket.realm.Principal;
14 |
15 | public interface AssignableResourceRepository extends ResourceTemplateRepository {
16 |
17 | List getAllAssignableResources(List principals);
18 |
19 | }
20 |
--------------------------------------------------------------------------------