<string name="share_link_no_support_share_api">Sorry, sharing is not enabled on your server. Please contact your administrator.</string>
<string name="share_link_file_no_exist">Unable to share this file or folder. Please, make sure it exists</string>
<string name="share_link_file_error">An error occurred while trying to share this file or folder</string>
+ <string name="unshare_link_file_no_exist">Unable to unshare this file or folder. It does not exist.</string>
<string name="unshare_link_file_error">An error occurred while trying to unshare this file or folder</string>
</resources>
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.accounts.OwnCloudAccount;
import com.owncloud.android.lib.network.webdav.WebdavUtils;
-import com.owncloud.android.lib.operations.common.ShareType;
-import com.owncloud.android.operations.CreateShareOperation;
-import com.owncloud.android.operations.UnshareLinkOperation;
+import com.owncloud.android.services.OperationsService;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.dialog.ActivityChooserDialog;
import com.owncloud.android.utils.Log_OC;
if (file != null) {
callerActivity.showLoadingDialog();
- CreateShareOperation createShare = new CreateShareOperation(file.getRemotePath(), ShareType.PUBLIC_LINK, "", false, "", 1, sendIntent);
- createShare.execute(callerActivity.getStorageManager(),
- callerActivity,
- callerActivity.getRemoteOperationListener(),
- callerActivity.getHandler(),
- callerActivity);
+
+ Intent service = new Intent(callerActivity, OperationsService.class);
+ service.setAction(OperationsService.ACTION_CREATE_SHARE);
+ service.putExtra(OperationsService.EXTRA_ACCOUNT, callerActivity.getAccount());
+ service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+ service.putExtra(OperationsService.EXTRA_SEND_INTENT, sendIntent);
+ callerActivity.startService(service);
} else {
Log_OC.wtf(TAG, "Trying to open a NULL OCFile");
if (isSharedSupported(callerActivity)) {
// Unshare the file
- UnshareLinkOperation unshare = new UnshareLinkOperation(file);
- unshare.execute(callerActivity.getStorageManager(),
- callerActivity,
- callerActivity.getRemoteOperationListener(),
- callerActivity.getHandler(),
- callerActivity);
-
+ Intent service = new Intent(callerActivity, OperationsService.class);
+ service.setAction(OperationsService.ACTION_UNSHARE);
+ service.putExtra(OperationsService.EXTRA_ACCOUNT, callerActivity.getAccount());
+ service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+ callerActivity.startService(service);
+
callerActivity.showLoadingDialog();
} else {
* Updates the OC File after a successful download.
*/
private void saveDownloadedFile() {
- OCFile file = mCurrentDownload.getFile();
+ OCFile file = mStorageManager.getFileById(mCurrentDownload.getFile().getFileId());
long syncDate = System.currentTimeMillis();
file.setLastSyncDateForProperties(syncDate);
file.setLastSyncDateForData(syncDate);
*/
private void saveUploadedFile() {
OCFile file = mCurrentUpload.getFile();
+ if (file.fileExists()) {
+ file = mStorageManager.getFileById(file.getFileId());
+ }
long syncDate = System.currentTimeMillis();
file.setLastSyncDateForData(syncDate);
OCShare share = (OCShare) result.getData().get(0);
// Update DB with the response
+ share.setPath(mPath);
if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
- share.setPath(mPath.substring(0, mPath.length()-1));
share.setIsFolder(true);
-
} else {
- share.setPath(mPath);
share.setIsFolder(false);
}
share.setPermissions(mPermissions);
package com.owncloud.android.operations;
+import android.content.Context;
+
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.network.OwnCloudClient;
import com.owncloud.android.lib.operations.common.OCShare;
import com.owncloud.android.lib.operations.common.RemoteOperationResult;
import com.owncloud.android.lib.operations.common.RemoteOperationResult.ResultCode;
+import com.owncloud.android.lib.operations.remote.ExistenceCheckRemoteOperation;
import com.owncloud.android.lib.operations.remote.RemoveRemoteShareOperation;
import com.owncloud.android.operations.common.SyncOperation;
import com.owncloud.android.utils.Log_OC;
private static final String TAG = UnshareLinkOperation.class.getSimpleName();
- private OCFile mFile;
+ private String mRemotePath;
+ private Context mContext;
+
- public UnshareLinkOperation(OCFile file) {
- mFile = file;
+ public UnshareLinkOperation(String remotePath, Context context) {
+ mRemotePath = remotePath;
+ mContext = context;
}
@Override
RemoteOperationResult result = null;
// Get Share for a file
- String path = mFile.getRemotePath();
- if (mFile.isFolder()) {
- path = path.substring(0, path.length()-1); // Remove last /
- }
- OCShare share = getStorageManager().getShareByPath(path);
+ OCShare share = getStorageManager().getShareByPath(mRemotePath);
if (share != null) {
RemoveRemoteShareOperation operation = new RemoveRemoteShareOperation((int) share.getIdRemoteShared());
if (result.isSuccess() || result.getCode() == ResultCode.SHARE_NOT_FOUND) {
Log_OC.d(TAG, "Share id = " + share.getIdRemoteShared() + " deleted");
- mFile.setShareByLink(false);
- mFile.setPublicLink("");
- getStorageManager().saveFile(mFile);
+ OCFile file = getStorageManager().getFileByPath(mRemotePath);
+ file.setShareByLink(false);
+ file.setPublicLink("");
+ getStorageManager().saveFile(file);
getStorageManager().removeShare(share);
if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
- result = new RemoteOperationResult(ResultCode.OK);
+ if (existsFile(client, file.getRemotePath())) {
+ result = new RemoteOperationResult(ResultCode.OK);
+ } else {
+ getStorageManager().removeFile(file, true, true);
+ }
}
}
return result;
}
+
+ private boolean existsFile(OwnCloudClient client, String remotePath){
+ ExistenceCheckRemoteOperation existsOperation = new ExistenceCheckRemoteOperation(remotePath, mContext, false);
+ RemoteOperationResult result = existsOperation.execute(client);
+ return result.isSuccess();
+ }
}
package com.owncloud.android.services;
import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
import java.util.concurrent.ConcurrentLinkedQueue;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.lib.network.OwnCloudClientFactory;
import com.owncloud.android.lib.network.OwnCloudClient;
-import com.owncloud.android.operations.GetSharesOperation;
+import com.owncloud.android.operations.CreateShareOperation;
+import com.owncloud.android.operations.UnshareLinkOperation;
import com.owncloud.android.operations.common.SyncOperation;
+import com.owncloud.android.lib.operations.common.OnRemoteOperationListener;
import com.owncloud.android.lib.operations.common.RemoteOperation;
import com.owncloud.android.lib.operations.common.RemoteOperationResult;
+import com.owncloud.android.lib.operations.common.ShareType;
import com.owncloud.android.utils.Log_OC;
import android.accounts.Account;
public static final String EXTRA_ACCOUNT = "ACCOUNT";
public static final String EXTRA_SERVER_URL = "SERVER_URL";
- public static final String EXTRA_RESULT = "RESULT";
+ public static final String EXTRA_REMOTE_PATH = "REMOTE_PATH";
+ public static final String EXTRA_SEND_INTENT = "SEND_INTENT";
+ public static final String EXTRA_RESULT = "RESULT";
+
+ public static final String ACTION_CREATE_SHARE = "CREATE_SHARE";
+ public static final String ACTION_UNSHARE = "UNSHARE";
public static final String ACTION_OPERATION_ADDED = OperationsService.class.getName() + ".OPERATION_ADDED";
public static final String ACTION_OPERATION_FINISHED = OperationsService.class.getName() + ".OPERATION_FINISHED";
private Looper mServiceLooper;
private ServiceHandler mServiceHandler;
- private IBinder mBinder;
+ private OperationsServiceBinder mBinder;
private OwnCloudClient mOwnCloudClient = null;
private Target mLastTarget = null;
private FileDataStorageManager mStorageManager;
try {
Account account = intent.getParcelableExtra(EXTRA_ACCOUNT);
String serverUrl = intent.getStringExtra(EXTRA_SERVER_URL);
+
Target target = new Target(account, (serverUrl == null) ? null : Uri.parse(serverUrl));
- GetSharesOperation operation = new GetSharesOperation();
+ RemoteOperation operation = null;
+
+ String action = intent.getAction();
+ if (action.equals(ACTION_CREATE_SHARE)) { // Create Share
+ String remotePath = intent.getStringExtra(EXTRA_REMOTE_PATH);
+ Intent sendIntent = intent.getParcelableExtra(EXTRA_SEND_INTENT);
+ if (remotePath.length() > 0) {
+ operation = new CreateShareOperation(remotePath, ShareType.PUBLIC_LINK,
+ "", false, "", 1, sendIntent);
+ }
+ } else if (action.equals(ACTION_UNSHARE)) { // Unshare file
+ String remotePath = intent.getStringExtra(EXTRA_REMOTE_PATH);
+ if (remotePath.length() > 0) {
+ operation = new UnshareLinkOperation(remotePath, this.getApplicationContext());
+ }
+ } else {
+ // nothing we are going to handle
+ return START_NOT_STICKY;
+ }
+
mPendingOperations.add(new Pair<Target , RemoteOperation>(target, operation));
- sendBroadcastNewOperation(target, operation);
+ //sendBroadcastNewOperation(target, operation);
Message msg = mServiceHandler.obtainMessage();
msg.arg1 = startId;
*
* It provides by itself the available operations.
*/
- public class OperationsServiceBinder extends Binder {
- // TODO
+ public class OperationsServiceBinder extends Binder /* implements OnRemoteOperationListener */ {
+
+ /**
+ * Map of listeners that will be reported about the end of operations from a {@link OperationsServiceBinder} instance
+ */
+ private Map<OnRemoteOperationListener, Handler> mBoundListeners = new HashMap<OnRemoteOperationListener, Handler>();
+
+ /**
+ * Cancels an operation
+ *
+ * TODO
+ */
+ public void cancel() {
+ // TODO
+ }
+
+
+ public void clearListeners() {
+
+ mBoundListeners.clear();
+ }
+
+
+ /**
+ * Adds a listener interested in being reported about the end of operations.
+ *
+ * @param listener Object to notify about the end of operations.
+ * @param callbackHandler {@link Handler} to access the listener without breaking Android threading protection.
+ */
+ public void addOperationListener (OnRemoteOperationListener listener, Handler callbackHandler) {
+ mBoundListeners.put(listener, callbackHandler);
+ }
+
+
+ /**
+ * Removes a listener from the list of objects interested in the being reported about the end of operations.
+ *
+ * @param listener Object to notify about progress of transfer.
+ */
+ public void removeOperationListener (OnRemoteOperationListener listener) {
+ mBoundListeners.remove(listener);
+ }
+
+
+ /**
+ * TODO - IMPORTANT: update implementation when more operations are moved into the service
+ *
+ * @return 'True' when an operation that enforces the user to wait for completion is in process.
+ */
+ public boolean isPerformingBlockingOperation() {
+ return (!mPendingOperations.isEmpty());
+ }
+
}
}
}
- sendBroadcastOperationFinished(mLastTarget, mCurrentOperation, result);
+ //sendBroadcastOperationFinished(mLastTarget, mCurrentOperation, result);
+ callbackOperationListeners(mLastTarget, mCurrentOperation, result);
}
}
/**
- * Sends a LOCAL broadcast when a new operation is added to the queue.
+ * Sends a broadcast when a new operation is added to the queue.
*
- * Local broadcasts are only delivered to activities in the same process.
+ * Local broadcasts are only delivered to activities in the same process, but can't be done sticky :\
*
* @param target Account or URL pointing to an OC server.
* @param operation Added operation.
//lbm.sendBroadcast(intent);
sendStickyBroadcast(intent);
}
+
+ /**
+ * Notifies the currently subscribed listeners about the end of an operation.
+ *
+ * @param target Account or URL pointing to an OC server.
+ * @param operation Finished operation.
+ * @param result Result of the operation.
+ */
+ private void callbackOperationListeners(Target target, final RemoteOperation operation, final RemoteOperationResult result) {
+ Iterator<OnRemoteOperationListener> listeners = mBinder.mBoundListeners.keySet().iterator();
+ while (listeners.hasNext()) {
+ final OnRemoteOperationListener listener = listeners.next();
+ final Handler handler = mBinder.mBoundListeners.get(listener);
+ if (handler != null) {
+ handler.post(new Runnable() {
+ @Override
+ public void run() {
+ listener.onRemoteOperationFinish(operation, result);
+ }
+ });
+ }
+ }
+
+ }
+
}
import android.accounts.AccountManagerCallback;
import android.accounts.AccountManagerFuture;
import android.accounts.OperationCanceledException;
+import android.content.ComponentName;
+import android.content.Context;
import android.content.Intent;
+import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Handler;
+import android.os.IBinder;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import com.owncloud.android.operations.CreateShareOperation;
import com.owncloud.android.operations.UnshareLinkOperation;
+import com.owncloud.android.services.OperationsService;
+import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
import com.owncloud.android.ui.dialog.LoadingDialog;
import com.owncloud.android.utils.Log_OC;
private FileDataStorageManager mStorageManager = null;
private FileOperationsHelper mFileOperationsHelper;
+
+ private ServiceConnection mOperationsServiceConnection = null;
+
+ private OperationsServiceBinder mOperationsServiceBinder = null;
/**
}
setAccount(account, savedInstanceState != null);
-
+
+ mOperationsServiceConnection = new OperationsServiceConnection();
+ bindService(new Intent(this, OperationsService.class), mOperationsServiceConnection, Context.BIND_AUTO_CREATE);
}
if (!validAccount) {
swapToDefaultAccount();
}
-
}
if (mAccountWasSet) {
onAccountSet(mAccountWasRestored);
}
+ if (mOperationsServiceBinder != null) {
+ mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler);
+ }
+ }
+
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ if (mOperationsServiceBinder != null) {
+ mOperationsServiceBinder.removeOperationListener(this);
+ }
+ }
+
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ if (mOperationsServiceConnection != null) {
+ unbindService(mOperationsServiceConnection);
+ mOperationsServiceBinder = null;
+ }
}
private void onCreateShareOperationFinish(CreateShareOperation operation, RemoteOperationResult result) {
dismissLoadingDialog();
if (result.isSuccess()) {
+ updateFileFromDB();
+
Intent sendIntent = operation.getSendIntent();
startActivity(sendIntent);
private void onUnshareLinkOperationFinish(UnshareLinkOperation operation, RemoteOperationResult result) {
dismissLoadingDialog();
- if (!result.isSuccess()){ // Generic error
+ if (result.isSuccess()){
+ updateFileFromDB();
+
+ } else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) { // Error --> SHARE_NOT_FOUND
+ Toast t = Toast.makeText(this, getString(R.string.unshare_link_file_no_exist), Toast.LENGTH_LONG);
+ t.show();
+ } else { // Generic error
// Show a Message, operation finished without success
Toast t = Toast.makeText(this, getString(R.string.unshare_link_file_error), Toast.LENGTH_LONG);
t.show();
}
+
+ private void updateFileFromDB(){
+ OCFile file = getStorageManager().getFileByPath(getFile().getRemotePath());
+ if (file != null) {
+ setFile(file);
+ }
+ }
+
/**
* Show loading dialog
*/
loading.dismiss();
}
}
+
+
+ /**
+ * Implements callback methods for service binding. Passed as a parameter to {
+ */
+ private class OperationsServiceConnection implements ServiceConnection {
+
+ @Override
+ public void onServiceConnected(ComponentName component, IBinder service) {
+ if (component.equals(new ComponentName(FileActivity.this, OperationsService.class))) {
+ Log_OC.d(TAG, "Operations service connected");
+ mOperationsServiceBinder = (OperationsServiceBinder) service;
+ mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler);
+ if (!mOperationsServiceBinder.isPerformingBlockingOperation()) {
+ dismissLoadingDialog();
+ }
+
+ } else {
+ return;
+ }
+ }
+
+
+ @Override
+ public void onServiceDisconnected(ComponentName component) {
+ if (component.equals(new ComponentName(FileActivity.this, OperationsService.class))) {
+ Log_OC.d(TAG, "Operations service disconnected");
+ mOperationsServiceBinder = null;
+ // TODO whatever could be waiting for the service is unbound
+ }
+ }
+ };
}
mRightFragmentContainer = findViewById(R.id.right_fragment_container);
if (savedInstanceState == null) {
createMinFragments();
+ } else {
+ Log_OC.d(TAG, "Init the secondFragment again");
+ if (mDualPane) {
+ initFragmentsWithFile();
+ }
}
// Action bar setup
protected void onStart() {
super.onStart();
getSupportActionBar().setIcon(DisplayUtils.getSeasonalIconId());
+ refeshListOfFilesFragment();
}
@Override
transaction.add(R.id.left_fragment_container, listOfFiles, TAG_LIST_OF_FILES);
transaction.commit();
}
-
+
private void initFragmentsWithFile() {
if (getAccount() != null && getFile() != null) {
/// First fragment
if (result.isSuccess()) {
refreshShowDetails();
refeshListOfFilesFragment();
+ } else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
+ cleanSecondFragment();
+ refeshListOfFilesFragment();
}
}
if (details != null) {
OCFile file = details.getFile();
if (file != null) {
- file = getStorageManager().getFileByPath(file.getRemotePath()); {
- if (!(details instanceof PreviewMediaFragment || details instanceof PreviewImageFragment)) {
- showDetails(file);
- } else if (details instanceof PreviewMediaFragment) {
- startMediaPreview(file, 0, false);
- }
- }
- invalidateOptionsMenu();
+ file = getStorageManager().getFileByPath(file.getRemotePath());
+ if (details instanceof PreviewMediaFragment) {
+ // Refresh OCFile of the fragment
+ ((PreviewMediaFragment) details).updateFile(file);
+ } else {
+ showDetails(file);
+ }
}
- }
+ invalidateOptionsMenu();
+ }
}
/**
super.onActivityCreated(savedInstanceState);
if (mAccount != null) {
mStorageManager = new FileDataStorageManager(mAccount, getActivity().getApplicationContext().getContentResolver());
+ OCFile file = mStorageManager.getFileByPath(getFile().getRemotePath());
+ if (file != null) {
+ setFile(file);
+ }
}
}
// Options shareLink
if (!file.isShareByLink()) {
toHide.add(R.id.action_unshare_file);
+ } else {
+ toShow.add(R.id.action_unshare_file);
}
MenuItem item = null;
import com.owncloud.android.lib.operations.common.OnRemoteOperationListener;
import com.owncloud.android.lib.operations.common.RemoteOperation;
import com.owncloud.android.lib.operations.common.RemoteOperationResult;
+import com.owncloud.android.lib.operations.common.RemoteOperationResult.ResultCode;
import com.owncloud.android.operations.CreateShareOperation;
+import com.owncloud.android.operations.UnshareLinkOperation;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.PinCodeActivity;
if (operation instanceof CreateShareOperation) {
onCreateShareOperationFinish((CreateShareOperation) operation, result);
+ } else if (operation instanceof UnshareLinkOperation) {
+ onUnshareLinkOperationFinish((UnshareLinkOperation) operation, result);
+
+ }
+ }
+
+
+ private void onUnshareLinkOperationFinish(UnshareLinkOperation operation, RemoteOperationResult result) {
+ if (result.isSuccess()) {
+ OCFile file = getStorageManager().getFileByPath(getFile().getRemotePath());
+ if (file != null) {
+ setFile(file);
+ }
+ invalidateOptionsMenu();
+ } else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
+ backToDisplayActivity();
}
+
}
private void onCreateShareOperationFinish(CreateShareOperation operation, RemoteOperationResult result) {
OCFile file = getStorageManager().getFileByPath(getFile().getRemotePath());
if (file != null) {
setFile(file);
- invalidateOptionsMenu();
}
+ invalidateOptionsMenu();
}
}
mStorageManager = new FileDataStorageManager(mAccount, getActivity().getApplicationContext().getContentResolver());
if (savedInstanceState != null) {
if (!mIgnoreFirstSavedState) {
- setFile((OCFile)savedInstanceState.getParcelable(PreviewImageFragment.EXTRA_FILE));
+ OCFile file = (OCFile)savedInstanceState.getParcelable(PreviewImageFragment.EXTRA_FILE);
mAccount = savedInstanceState.getParcelable(PreviewImageFragment.EXTRA_ACCOUNT);
+
+ // Update the file
+ if (mAccount!= null) {
+ mStorageManager = new FileDataStorageManager(mAccount, getActivity().getApplicationContext().getContentResolver());
+ OCFile updatedFile = mStorageManager.getFileByPath(file.getRemotePath());
+ if (updatedFile != null) {
+ setFile(updatedFile);
+ } else {
+ setFile(file);
+ }
+ } else {
+ setFile(file);
+ }
+
} else {
mIgnoreFirstSavedState = false;
}
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
- // Trick to update the file
- OCFile file = ((PreviewImageActivity) getActivity()).getStorageManager().getFileByPath(getFile().getRemotePath());
- if (file!= null) {
- setFile(file);
- }
-
MenuItem item = menu.findItem(R.id.action_unshare_file);
// Options shareLink
- if (!getFile().isShareByLink()) {
+ OCFile file = ((FileActivity) getSherlockActivity()).getFile();
+ if (!file.isShareByLink()) {
item.setVisible(false);
item.setEnabled(false);
} else {
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
+ MenuItem item = menu.findItem(R.id.action_unshare_file);
// Options shareLink
- if (!getFile().isShareByLink()) {
- MenuItem item = menu.findItem(R.id.action_unshare_file);
+ if (!getFile().isShareByLink()) {
item.setVisible(false);
item.setEnabled(false);
+ } else {
+ item.setVisible(true);
+ item.setEnabled(true);
}
}
+ /**
+ * Update the file of the fragment with file value
+ * @param file
+ */
+ public void updateFile(OCFile file){
+ setFile(file);
+ }
+
private void unshareFileWithLink() {
stopPreview(false);
FileActivity activity = (FileActivity)((FileFragment.ContainerActivity)getActivity());
@Override
public void onServiceConnected(ComponentName component, IBinder service) {
- if (component.equals(new ComponentName(getActivity(), MediaService.class))) {
- Log_OC.d(TAG, "Media service connected");
- mMediaServiceBinder = (MediaServiceBinder) service;
- if (mMediaServiceBinder != null) {
- prepareMediaController();
- playAudio(); // do not wait for the touch of nobody to play audio
-
- Log_OC.d(TAG, "Successfully bound to MediaService, MediaController ready");
-
- } else {
- Log_OC.e(TAG, "Unexpected response from MediaService while binding");
+ if (getActivity() != null) {
+ if (component.equals(new ComponentName(getActivity(), MediaService.class))) {
+ Log_OC.d(TAG, "Media service connected");
+ mMediaServiceBinder = (MediaServiceBinder) service;
+ if (mMediaServiceBinder != null) {
+ prepareMediaController();
+ playAudio(); // do not wait for the touch of nobody to play audio
+
+ Log_OC.d(TAG, "Successfully bound to MediaService, MediaController ready");
+
+ } else {
+ Log_OC.e(TAG, "Unexpected response from MediaService while binding");
+ }
}
}
}