forked from OpenStackweb/openstack-org
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[spalenque] - #12942 * revamp and refactor of track chairs app
fix concurrency bug and tune up drag and drop 12948 - add moved flag on browse page 12949 - send email con change request and add rejection reason remove lightning and tune up concurrency fix concurrency bug and tune up drag and drop 12958 - add rate to speakers and link to bureau fix bugs 1 fix bug on drag from team to other list 13045 - resolve category change bug fix 13056 - fix change request persisting 13045 - fix bug on approve change request 13061 - start wip 13061 - track chair push notification backend firebase wip firebase push notification wip wip 13061 - adding push notific wip 13061 - done adding push notif 13061 - bug fix bug fixxx remove server key from template [smarcet] - #13061 (OpenStackweb#88) * proposed refactoring to push notifications
- Loading branch information
1 parent
10a9f7d
commit 937a35e
Showing
65 changed files
with
1,770 additions
and
736 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
Name: 'push-notification-injection' | ||
--- | ||
Injector: | ||
FirebaseSerializationSummitFactory: | ||
class: FireBaseSerializationTrackChairPushNotificationFactory | ||
FirebaseSerializationTrackChairFactory: | ||
class: FireBaseSerializationSummitPushNotificationFactory | ||
FireBasePushNotificationSerializationStrategyFactory: | ||
constructor: | ||
- '%$FirebaseSerializationSummitFactory' | ||
- '%$FirebaseSerializationTrackChairFactory' | ||
PushNotificationSenderTask: | ||
constructor: | ||
0: '%$FireBasePushNotificationSerializationStrategyFactory' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
Name: pushnotificationroutes | ||
After: 'framework/routes#coreroutes' | ||
--- | ||
Director: | ||
rules: | ||
'api/v1/push_notifications': 'PushNotificationAPI' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...ns/code/infrastructure/factories/FireBasePushNotificationSerializationStrategyFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2017 OpenStack Foundation | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
**/ | ||
final class FireBasePushNotificationSerializationStrategyFactory implements IFireBasePushNotificationSerializationStrategyFactory | ||
{ | ||
|
||
/** | ||
* @var IFireBasePushNotificationSerializationStrategyFactory | ||
*/ | ||
private $factories; | ||
/** | ||
* FireBasePushNotificationSerializationStrategyFactory constructor. | ||
*/ | ||
public function __construct() | ||
{ | ||
// this is done in this way bc framework/control/injector/InjectionCreator.php | ||
// does not support pass array as constructor param | ||
$this->factories = func_get_args(); | ||
} | ||
|
||
/** | ||
* @param IPushNotificationMessage $message | ||
* @return IFireBasePushNotificationSerializationStrategy; | ||
*/ | ||
function build(IPushNotificationMessage $message) | ||
{ | ||
$strategy = null; | ||
foreach($this->factories as $factory){ | ||
$strategy = $factory->build($message); | ||
if(!is_null($strategy)) break; | ||
} | ||
return $strategy; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...s/code/infrastructure/factories/IFireBasePushNotificationSerializationStrategyFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2017 OpenStack Foundation | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
**/ | ||
interface IFireBasePushNotificationSerializationStrategyFactory | ||
{ | ||
/** | ||
* @param IPushNotificationMessage $message | ||
* @return IFireBasePushNotificationSerializationStrategy; | ||
*/ | ||
function build(IPushNotificationMessage $message); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.